Class: ATM::RTM
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(java_class) ⇒ RTM
constructor
A new instance of RTM.
- #method_missing(symbol, args = {}) ⇒ Object
Constructor Details
#initialize(java_class) ⇒ RTM
Returns a new instance of RTM.
51 52 53 |
# File 'lib/atm/rtm.rb', line 51 def initialize(java_class) @class = java_class.to_s.camelcase end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol, args = {}) ⇒ Object
55 56 57 58 59 60 61 62 |
# File 'lib/atm/rtm.rb', line 55 def method_missing(symbol, args = {}) if @class == "tasks" and symbol.to_s == "notes" RTM.new "tasks.notes" else method = symbol.to_s.camelcase Requester.instance.request "rtm.#{@class}.#{method}", args end end |