Class: FbGraph::Query
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#query ⇒ Object
Returns the value of attribute query.
Attributes inherited from Node
Instance Method Summary collapse
- #fetch(access_token = nil) ⇒ Object
-
#initialize(query, access_token = nil) ⇒ Query
constructor
A new instance of Query.
Methods inherited from Node
Methods included from Comparison
Constructor Details
#initialize(query, access_token = nil) ⇒ Query
Returns a new instance of Query.
5 6 7 8 |
# File 'lib/fb_graph/query.rb', line 5 def initialize(query, access_token = nil) @query = query @access_token = access_token end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
3 4 5 |
# File 'lib/fb_graph/query.rb', line 3 def access_token @access_token end |
#query ⇒ Object
Returns the value of attribute query.
3 4 5 |
# File 'lib/fb_graph/query.rb', line 3 def query @query end |
Instance Method Details
#fetch(access_token = nil) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/fb_graph/query.rb', line 10 def fetch(access_token = nil) self.access_token ||= access_token handle_response do RestClient.get build_endpoint end end |