Class: Reponaut::Application::LongPresenter

Inherits:
Presenter show all
Defined in:
lib/reponaut/presenter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLongPresenter

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

#countObject (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