Class: FacebookRb::Client::APIProxy
- Inherits:
-
Object
- Object
- FacebookRb::Client::APIProxy
- Defined in:
- lib/facebookrb.rb
Overview
Allows making calls like ‘client.users.getInfo`
Constant Summary collapse
- TYPES =
%w[ admin application auth comments connect data events fbml feed fql friends groups links liveMessage notes notifications pages photos profile sms status stream users video ]
Instance Method Summary collapse
-
#initialize(name, obj) ⇒ APIProxy
constructor
A new instance of APIProxy.
- #method_missing(method, opts = {}) ⇒ Object
Constructor Details
#initialize(name, obj) ⇒ APIProxy
Returns a new instance of APIProxy.
315 316 317 |
# File 'lib/facebookrb.rb', line 315 def initialize name, obj @name, @obj = name, obj end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, opts = {}) ⇒ Object
319 320 321 |
# File 'lib/facebookrb.rb', line 319 def method_missing method, opts = {} @obj.call "#{@name}.#{method}", opts end |