Class: Reponaut::Application::LongPresenter
- Defined in:
- lib/reponaut/presenter.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
Instance Method Summary collapse
- #format(repo) ⇒ Object
-
#initialize ⇒ LongPresenter
constructor
A new instance of LongPresenter.
Constructor Details
#initialize ⇒ LongPresenter
Returns a new instance of LongPresenter.
23 24 25 26 |
# File 'lib/reponaut/presenter.rb', line 23 def initialize super @count = 0 end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
21 22 23 |
# File 'lib/reponaut/presenter.rb', line 21 def count @count end |
Instance Method Details
#format(repo) ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/reponaut/presenter.rb', line 28 def format(repo) line = super line = "\n#{line}" unless @count == 0 line = "#{line}\n #{repo.description}" @count += 1 line end |