Class: Fusuma::Plugin::Events::Records::KeypressRecord
- Inherits:
-
Record
- Object
- Record
- Fusuma::Plugin::Events::Records::KeypressRecord
- Defined in:
- lib/fusuma/plugin/events/records/keypress_record.rb
Overview
Record for Keypress event
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#layer ⇒ Object
readonly
Returns the value of attribute layer.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status:, code:, layer: nil) ⇒ KeypressRecord
constructor
A new instance of KeypressRecord.
- #to_s ⇒ Object
Constructor Details
#initialize(status:, code:, layer: nil) ⇒ KeypressRecord
Returns a new instance of KeypressRecord.
17 18 19 20 21 22 |
# File 'lib/fusuma/plugin/events/records/keypress_record.rb', line 17 def initialize(status:, code:, layer: nil) super() @status = status @code = code @layer = layer end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
9 10 11 |
# File 'lib/fusuma/plugin/events/records/keypress_record.rb', line 9 def code @code end |
#layer ⇒ Object (readonly)
Returns the value of attribute layer.
9 10 11 |
# File 'lib/fusuma/plugin/events/records/keypress_record.rb', line 9 def layer @layer end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/fusuma/plugin/events/records/keypress_record.rb', line 9 def status @status end |
Instance Method Details
#to_s ⇒ Object
24 25 26 |
# File 'lib/fusuma/plugin/events/records/keypress_record.rb', line 24 def to_s "#{status} #{code} #{layer}" end |