Class: Tamashii::Agent::Event

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

Constant Summary collapse

BEEP =
1
SYSTEM_COMMAND =
2
AUTH_RESULT =
3
CARD_DATA =
4
LCD_MESSAGE =
5
LCD_SET_IDLE_TEXT =
6
RESTART_COMPONENT =
254
CONNECTION_NOT_READY =
255

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, body) ⇒ Event

Returns a new instance of Event.



19
20
21
22
23
# File 'lib/tamashii/agent/event.rb', line 19

def initialize(type, body)
  @type = type
  @body = body
  self.freeze
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



17
18
19
# File 'lib/tamashii/agent/event.rb', line 17

def body
  @body
end

#typeObject (readonly)

Returns the value of attribute type.



17
18
19
# File 'lib/tamashii/agent/event.rb', line 17

def type
  @type
end

Instance Method Details

#==(other) ⇒ Object



25
26
27
# File 'lib/tamashii/agent/event.rb', line 25

def ==(other)
  @type == other.type && @body == other.body
end