Class: Ajar

Inherits:
Object
  • Object
show all
Defined in:
lib/ajar.rb

Constant Summary collapse

SERVER =
'http://ajar-web.herokuapp.com'
HEADERS =
{'Content-Type' => 'application/json'}

Instance Method Summary collapse

Constructor Details

#initialize(graph, developer_key) ⇒ Ajar

Returns a new instance of Ajar.



8
9
10
# File 'lib/ajar.rb', line 8

def initialize(graph, developer_key)
  @graph, @developer_key = graph, developer_key
end

Instance Method Details

#put_connections(*arguments) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/ajar.rb', line 12

def put_connections(*arguments)
  options = arguments.pop
  options.keys.each do |key|
    options[key] = external_uri_for options[key]
  end if local_environment?

  graph.put_connections *(arguments + [options])
end