Class: TodoView
- Inherits:
-
Object
- Object
- TodoView
- Defined in:
- lib/todo_view.rb
Instance Method Summary collapse
-
#initialize(todo) ⇒ TodoView
constructor
A new instance of TodoView.
- #render ⇒ Object
Constructor Details
#initialize(todo) ⇒ TodoView
Returns a new instance of TodoView.
4 5 6 |
# File 'lib/todo_view.rb', line 4 def initialize(todo) @todo = todo end |
Instance Method Details
#render ⇒ Object
8 9 10 11 12 |
# File 'lib/todo_view.rb', line 8 def render output = "#{formated_id} #{@todo.description}" output += mark_if_finished(output) end |