Class: Rufus::RTM::MilkResource

Inherits:
Object
  • Object
show all
Defined in:
lib/rufus/rtm/resources.rb

Overview

A parent class for Task, List and co.

Never use directly.

Direct Known Subclasses

List, Task

Instance Method Summary collapse

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