Class: Rufus::RTM::MilkResource
- Inherits:
-
Object
- Object
- Rufus::RTM::MilkResource
- Defined in:
- lib/rufus/rtm/resources.rb
Overview
A parent class for Task, List and co.
Never use directly.
Instance Method Summary collapse
-
#initialize(hsh) ⇒ MilkResource
constructor
A new instance of MilkResource.
-
#save! ⇒ Object
Saves the instance back to RTM.
Constructor Details
#initialize(hsh) ⇒ MilkResource
Returns a new instance of MilkResource.
35 36 37 38 39 |
# File 'lib/rufus/rtm/resources.rb', line 35 def initialize (hsh) @hsh = hsh @operations = [] end |
Instance Method Details
#save! ⇒ Object
Saves the instance back to RTM.
44 45 46 47 48 49 50 51 52 53 |
# File 'lib/rufus/rtm/resources.rb', line 44 def save! # TODO : compact ! @operations.reverse.each do |method_name, args| self.class.execute method_name, args end @operations = [] end |