Class: ATM::List
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#taskseries ⇒ Object
readonly
Returns the value of attribute taskseries.
Class Method Summary collapse
Instance Method Summary collapse
- #delete! ⇒ Object
-
#initialize(obj) ⇒ List
constructor
A new instance of List.
- #load_values(obj) ⇒ Object
- #save! ⇒ Object
Constructor Details
#initialize(obj) ⇒ List
Returns a new instance of List.
14 15 16 |
# File 'lib/atm/list.rb', line 14 def initialize(obj) load_values obj end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/atm/list.rb', line 5 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/atm/list.rb', line 5 def name @name end |
#taskseries ⇒ Object (readonly)
Returns the value of attribute taskseries.
5 6 7 |
# File 'lib/atm/list.rb', line 5 def taskseries @taskseries end |
Class Method Details
Instance Method Details
#delete! ⇒ Object
37 38 39 40 41 42 |
# File 'lib/atm/list.rb', line 37 def delete! @taskseries.each do |task| taskseries.delete! end RTM.lists.delete :list_id => :id end |
#load_values(obj) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/atm/list.rb', line 18 def load_values(obj) obj = Hashie::Mash.new obj @id = obj.id @name = obj.name @taskseries = obj.taskseries.in_array.map do |t| t.list = self Taskseries.new t end end |