Class: ROX::ConfigTree

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

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ ConfigTree

Returns a new instance of ConfigTree.



3
4
5
# File 'lib/rox/config_tree.rb', line 3

def initialize(client)
  @client = client
end

Instance Method Details

#[](path) ⇒ Object



7
8
9
# File 'lib/rox/config_tree.rb', line 7

def [](path)
  return @client.get_response("/ajax/config/#{path}")["data"]
end

#[]=(path, value) ⇒ Object



11
12
13
# File 'lib/rox/config_tree.rb', line 11

def []=(path, value)
  @client.put("/ajax/config/#{path}", :body => value.to_json)
end