Class: Task

Inherits:
Object
  • Object
show all
Defined in:
lib/slimtimercli/entities.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hoursObject

Returns the value of attribute hours.



23
24
25
# File 'lib/slimtimercli/entities.rb', line 23

def hours
  @hours
end

#idObject

Returns the value of attribute id.



23
24
25
# File 'lib/slimtimercli/entities.rb', line 23

def id
  @id
end

#nameObject

Returns the value of attribute name.



23
24
25
# File 'lib/slimtimercli/entities.rb', line 23

def name
  @name
end

#ownersObject

Returns the value of attribute owners.



23
24
25
# File 'lib/slimtimercli/entities.rb', line 23

def owners
  @owners
end

#roleObject

Returns the value of attribute role.



23
24
25
# File 'lib/slimtimercli/entities.rb', line 23

def role
  @role
end

#tagsObject

Returns the value of attribute tags.



23
24
25
# File 'lib/slimtimercli/entities.rb', line 23

def tags
  @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

#_serializeObject



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