Class: Todo
- Inherits:
-
Struct
- Object
- Struct
- Todo
- Defined in:
- lib/glimmer-dsl-web/samples/regular/todo_mvc/models/todo.rb
Instance Attribute Summary collapse
-
#completed ⇒ Object
(also: #completed?)
Returns the value of attribute completed.
-
#deleted ⇒ Object
(also: #deleted?)
Returns the value of attribute deleted.
-
#editing ⇒ Object
(also: #editing?)
Returns the value of attribute editing.
-
#task ⇒ Object
Returns the value of attribute task.
Instance Method Summary collapse
- #active ⇒ Object (also: #active?)
- #cancel_editing ⇒ Object
- #save_editing ⇒ Object
- #start_editing ⇒ Object
Instance Attribute Details
#completed ⇒ Object Also known as: completed?
Returns the value of attribute completed
1 2 3 |
# File 'lib/glimmer-dsl-web/samples/regular/todo_mvc/models/todo.rb', line 1 def completed @completed end |
#deleted ⇒ Object Also known as: deleted?
Returns the value of attribute deleted
1 2 3 |
# File 'lib/glimmer-dsl-web/samples/regular/todo_mvc/models/todo.rb', line 1 def deleted @deleted end |
#editing ⇒ Object Also known as: editing?
Returns the value of attribute editing
1 2 3 |
# File 'lib/glimmer-dsl-web/samples/regular/todo_mvc/models/todo.rb', line 1 def editing @editing end |
#task ⇒ Object
Returns the value of attribute task
1 2 3 |
# File 'lib/glimmer-dsl-web/samples/regular/todo_mvc/models/todo.rb', line 1 def task @task end |
Instance Method Details
#active ⇒ Object Also known as: active?
6 |
# File 'lib/glimmer-dsl-web/samples/regular/todo_mvc/models/todo.rb', line 6 def active = !completed |
#cancel_editing ⇒ Object
15 16 17 18 19 |
# File 'lib/glimmer-dsl-web/samples/regular/todo_mvc/models/todo.rb', line 15 def cancel_editing return unless editing? self.task = @original_task self.editing = false end |
#save_editing ⇒ Object
21 22 23 24 |
# File 'lib/glimmer-dsl-web/samples/regular/todo_mvc/models/todo.rb', line 21 def save_editing return unless editing? self.editing = false end |
#start_editing ⇒ Object
9 10 11 12 13 |
# File 'lib/glimmer-dsl-web/samples/regular/todo_mvc/models/todo.rb', line 9 def start_editing return if editing? @original_task = task self.editing = true end |