Class: Holoserve::Connector::State
- Inherits:
-
Object
- Object
- Holoserve::Connector::State
- Defined in:
- lib/holoserve/connector/state.rb
Instance Method Summary collapse
- #clear! ⇒ Object
- #get ⇒ Object
-
#initialize(client) ⇒ State
constructor
A new instance of State.
- #set(hash) ⇒ Object
Constructor Details
#initialize(client) ⇒ State
Returns a new instance of State.
5 6 7 |
# File 'lib/holoserve/connector/state.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#clear! ⇒ Object
17 18 19 |
# File 'lib/holoserve/connector/state.rb', line 17 def clear! Transport::JSON.request :delete, "#{@client.url}/state" end |
#get ⇒ Object
13 14 15 |
# File 'lib/holoserve/connector/state.rb', line 13 def get Transport::JSON.request :get, "#{@client.url}/state" end |
#set(hash) ⇒ Object
9 10 11 |
# File 'lib/holoserve/connector/state.rb', line 9 def set(hash) Transport::JSON.request :put, "#{@client.url}/state", :parameters => hash end |