Class: Myo::Client

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

Instance Method Summary collapse

Constructor Details

#initialize(socket_url) ⇒ Client

Returns a new instance of Client.



63
64
65
66
# File 'lib/myo/client.rb', line 63

def initialize(socket_url)
  @socket_url = socket_url
  @chamber = Myo::Chamber.new(@socket_url)
end

Instance Method Details

#on(event_name, &block) ⇒ Object



68
69
70
# File 'lib/myo/client.rb', line 68

def on(event_name, &block)
  @chamber.callbacks_[event_name.to_sym] = block
end

#startObject



72
73
74
# File 'lib/myo/client.rb', line 72

def start
  @chamber.start
end