Class: RubyMetaGraph::Me
- Inherits:
-
Object
- Object
- RubyMetaGraph::Me
- Includes:
- RubyMetaGraph
- Defined in:
- lib/ruby_meta_graph/me.rb
Constant Summary
Constants included from RubyMetaGraph
Instance Method Summary collapse
-
#initialize(fields, access) ⇒ Me
constructor
A new instance of Me.
- #run ⇒ Object
Methods included from RubyMetaGraph
Constructor Details
#initialize(fields, access) ⇒ Me
Returns a new instance of Me.
5 6 7 8 |
# File 'lib/ruby_meta_graph/me.rb', line 5 def initialize(fields, access) @fields = fields @access = access end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/ruby_meta_graph/me.rb', line 10 def run response = connect.get( "me", { fields: @fields, access_token: @access } ) return JSON.parse(response.body, object_class: OpenStruct) end |