Class: MultiLighthouse
- Inherits:
-
Object
- Object
- MultiLighthouse
- Defined in:
- lib/multi_lighthouse.rb
Instance Method Summary collapse
-
#initialize(account, token) ⇒ MultiLighthouse
constructor
A new instance of MultiLighthouse.
- #method_missing(meth, *args, &block) ⇒ Object
Constructor Details
#initialize(account, token) ⇒ MultiLighthouse
Returns a new instance of MultiLighthouse.
13 14 15 16 |
# File 'lib/multi_lighthouse.rb', line 13 def initialize(account, token) @account = account @token = token end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/multi_lighthouse.rb', line 2 def method_missing(meth, *args, &block) begin const = Lighthouse.const_get(meth) Lighthouse.account = @account Lighthouse.token = @token return const rescue NameError => ne Lighthouse.send(meth, args, block) end end |