Class: Firmata::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/firmata/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, *data) ⇒ Event

Returns a new instance of Event.



5
6
7
8
# File 'lib/firmata/event.rb', line 5

def initialize(name, *data)
  @name = name.to_sym
  @data = *data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



3
4
5
# File 'lib/firmata/event.rb', line 3

def data
  @data
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/firmata/event.rb', line 3

def name
  @name
end