Class: Logan::Todo
- Inherits:
-
Object
- Object
- Logan::Todo
- Includes:
- HashConstructed
- Defined in:
- lib/logan/todo.rb
Instance Attribute Summary collapse
-
#assignee ⇒ Object
Returns the value of attribute assignee.
-
#completed ⇒ Object
Returns the value of attribute completed.
-
#content ⇒ Object
Returns the value of attribute content.
-
#due_at ⇒ Object
Returns the value of attribute due_at.
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
Methods included from HashConstructed
Instance Attribute Details
#assignee ⇒ Object
Returns the value of attribute assignee.
11 12 13 |
# File 'lib/logan/todo.rb', line 11 def assignee @assignee end |
#completed ⇒ Object
Returns the value of attribute completed.
10 11 12 |
# File 'lib/logan/todo.rb', line 10 def completed @completed end |
#content ⇒ Object
Returns the value of attribute content.
9 10 11 |
# File 'lib/logan/todo.rb', line 9 def content @content end |
#due_at ⇒ Object
Returns the value of attribute due_at.
12 13 14 |
# File 'lib/logan/todo.rb', line 12 def due_at @due_at end |
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/logan/todo.rb', line 8 def id @id end |
Instance Method Details
#post_json ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/logan/todo.rb', line 14 def post_json { :content => @content, :due_at => @due_at, :assignee => @assignee.to_hash }.to_json end |
#put_json ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/logan/todo.rb', line 22 def put_json { :content => @content, :due_at => @due_at, :assignee => @assignee.to_hash, :completed => @completed }.to_json end |