• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kernow / shortcode / 145
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: presenter-inheritance-support
DEFAULT BRANCH: master
Ran 27 Apr 2019 04:04PM UTC
Jobs 3
Files 27
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
145

Pull #56

travis-ci

web-flow
Allow presenters to define initialize via inheritance

It would be nice to be able to define a BasePresenter that defines some
base helper methods or even defines a default behavior for the 4
required methods. Then it would be up to any child classes to override
that default behavior.

Currently this is possible for `self.for`, `content`, and `attributes`.
But initialize is weird because `Object` defines initialize and we don't
want that to "count".

So in order to support the initialize being inheritable to child
classes, I've changed the condition around when we throw the validation
error to check the presenter's class ancestory _until_ we reach Object.
At that point we assume failure and raise the validation error.
Pull Request #56: Allow presenters to define initialize via inheritance

15 of 15 new or added lines in 4 files covered. (100.0%)

656 of 659 relevant lines covered (99.54%)

35.67 hits per line

Jobs
ID Job ID Ran Files Coverage
1 145.1 (2.2.8, gemfiles/rails_4.2.gemfile) 27 Apr 2019 04:04PM UTC 0
99.54
Travis Job 145.1
2 145.2 (2.2.8, gemfiles/rails_5.0.gemfile) 27 Apr 2019 04:04PM UTC 0
99.54
Travis Job 145.2
3 145.3 (2.2.8, gemfiles/rails_5.1.gemfile) 27 Apr 2019 04:06PM UTC 0
99.54
Travis Job 145.3
Source Files on build 145
  • Tree
  • List 0
  • Changed 4
  • Source Changed 2
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #145
  • Pull Request #56
  • PR Base - master (#144)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc