Class: Holoserve::Connector::State

Inherits:
Object
  • Object
show all
Defined in:
lib/holoserve/connector/state.rb

Instance Method Summary collapse

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

#getObject



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