Module: MetaGraph::GraphAccessor
- Included in:
- Collection, Node
- Defined in:
- lib/meta_graph/graph_accessor.rb
Instance Method Summary collapse
Instance Method Details
#read_graph(access_token, data) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/meta_graph/graph_accessor.rb', line 3 def read_graph(access_token, data) if data.is_a?(Array) Collection.new(access_token, data) elsif data.is_a?(Hash) Node.new(access_token, data) else data end end |