Class: FacebookOAuth::FacebookObject
- Inherits:
-
Object
- Object
- FacebookOAuth::FacebookObject
- Defined in:
- lib/facebook_oauth/objects.rb
Instance Method Summary (collapse)
- - (Object) info
-
- (FacebookObject) initialize(oid, client)
constructor
A new instance of FacebookObject.
- - (Object) method_missing(method, *args)
Constructor Details
- (FacebookObject) initialize(oid, client)
A new instance of FacebookObject
55 56 57 58 |
# File 'lib/facebook_oauth/objects.rb', line 55 def initialize(oid, client) @oid = oid @client = client end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
- (Object) method_missing(method, *args)
64 65 66 67 68 69 70 71 72 73 |
# File 'lib/facebook_oauth/objects.rb', line 64 def method_missing(method, *args) first = args.shift params = args.first || {} if first and first == :create @client.send(:_post, "/#{@oid}/#{method.to_s}", params) else @client.send(:_get, "/#{@oid}/#{method.to_s}") end end |
Instance Method Details
- (Object) info
60 61 62 |
# File 'lib/facebook_oauth/objects.rb', line 60 def info @client.send(:_get, @oid) end |