Class: ROX::ConfigTree
- Inherits:
-
Object
- Object
- ROX::ConfigTree
- Defined in:
- lib/rox/config_tree.rb
Instance Method Summary collapse
- #[](path) ⇒ Object
- #[]=(path, value) ⇒ Object
-
#initialize(client) ⇒ ConfigTree
constructor
A new instance of ConfigTree.
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 |