Class: EventMachine::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/em-serialport/connection.rb

Instance Method Summary collapse

Instance Method Details

#associate_callback_target(sig) ⇒ Object



13
14
15
# File 'lib/em-serialport/connection.rb', line 13

def associate_callback_target(sig)
  return(nil)
end

#on_data(&blk) ⇒ Object



3
# File 'lib/em-serialport/connection.rb', line 3

def on_data(&blk);  @on_data = blk; end

#receive_data(data) ⇒ Object



9
10
11
# File 'lib/em-serialport/connection.rb', line 9

def receive_data data
  trigger_on_data(data)
end

#trigger_on_data(data) ⇒ Object



5
6
7
# File 'lib/em-serialport/connection.rb', line 5

def trigger_on_data(data)
  @on_data.call(data) if @on_data
end