Class: Nin::Presenter::TodoPresenter
- Defined in:
- lib/nin/presenters/todo_presenter.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/nin/presenters/todo_presenter.rb', line 4 def call return 'No todo items yet. Call `nin add hello world` to add a new item.' if self.empty? = { separating_spaces: 4, longest_id: self.map(&:id).max.length, longest_date: 11 } self.map do |item| Presenter::ItemPresenter.new(item).call() end end |