Class: RubySketch::VirtualKey::KeyEvent
- Inherits:
-
Object
- Object
- RubySketch::VirtualKey::KeyEvent
- Defined in:
- lib/rubysketch/virtual_key.rb
Instance Attribute Summary collapse
-
#chars ⇒ Object
readonly
Returns the value of attribute chars.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #down? ⇒ Boolean
-
#initialize(type, chars, key) ⇒ KeyEvent
constructor
A new instance of KeyEvent.
- #up? ⇒ Boolean
Constructor Details
#initialize(type, chars, key) ⇒ KeyEvent
Returns a new instance of KeyEvent.
139 140 141 |
# File 'lib/rubysketch/virtual_key.rb', line 139 def initialize(type, chars, key) @type, @chars, @key = type, chars, key end |
Instance Attribute Details
#chars ⇒ Object (readonly)
Returns the value of attribute chars.
137 138 139 |
# File 'lib/rubysketch/virtual_key.rb', line 137 def chars @chars end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
137 138 139 |
# File 'lib/rubysketch/virtual_key.rb', line 137 def key @key end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
137 138 139 |
# File 'lib/rubysketch/virtual_key.rb', line 137 def type @type end |
Instance Method Details
#down? ⇒ Boolean
143 144 145 |
# File 'lib/rubysketch/virtual_key.rb', line 143 def down?() @type == :down end |
#up? ⇒ Boolean
147 148 149 |
# File 'lib/rubysketch/virtual_key.rb', line 147 def up?() @type == :up end |