Class: Task
- Inherits:
-
Object
- Object
- Task
- Defined in:
- lib/slimtimercli/entities.rb
Instance Attribute Summary collapse
-
#hours ⇒ Object
Returns the value of attribute hours.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#owners ⇒ Object
Returns the value of attribute owners.
-
#role ⇒ Object
Returns the value of attribute role.
-
#tags ⇒ Object
Returns the value of attribute tags.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#hours ⇒ Object
Returns the value of attribute hours.
23 24 25 |
# File 'lib/slimtimercli/entities.rb', line 23 def hours @hours end |
#id ⇒ Object
Returns the value of attribute id.
23 24 25 |
# File 'lib/slimtimercli/entities.rb', line 23 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
23 24 25 |
# File 'lib/slimtimercli/entities.rb', line 23 def name @name end |
#owners ⇒ Object
Returns the value of attribute owners.
23 24 25 |
# File 'lib/slimtimercli/entities.rb', line 23 def owners @owners end |
#role ⇒ Object
Returns the value of attribute role.
23 24 25 |
# File 'lib/slimtimercli/entities.rb', line 23 def role @role end |
#tags ⇒ Object
Returns the value of attribute tags.
23 24 25 |
# File 'lib/slimtimercli/entities.rb', line 23 def @tags end |
Class Method Details
._load(hsh) ⇒ Object
26 27 28 |
# File 'lib/slimtimercli/entities.rb', line 26 def self._load(hsh) Task.new.__send__(:_load, hsh) end |
Instance Method Details
#_serialize ⇒ Object
30 31 32 33 34 |
# File 'lib/slimtimercli/entities.rb', line 30 def _serialize {"task" => instance_variables.map{ |i| {i.to_s.gsub("@", "") => instance_variable_get(i)} }.inject({}){|m,v| m.merge v}} end |