Class: RubySketch::VirtualKey::KeyEvent
- Inherits:
-
Object
- Object
- RubySketch::VirtualKey::KeyEvent
- Defined in:
- lib/rubysketch/window.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.
137 138 139 |
# File 'lib/rubysketch/window.rb', line 137 def initialize(type, chars, key) @type, @chars, @key = type, chars, key end |
Instance Attribute Details
#chars ⇒ Object (readonly)
Returns the value of attribute chars.
135 136 137 |
# File 'lib/rubysketch/window.rb', line 135 def chars @chars end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
135 136 137 |
# File 'lib/rubysketch/window.rb', line 135 def key @key end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
135 136 137 |
# File 'lib/rubysketch/window.rb', line 135 def type @type end |
Instance Method Details
#down? ⇒ Boolean
141 142 143 |
# File 'lib/rubysketch/window.rb', line 141 def down?() @type == :down end |
#up? ⇒ Boolean
145 146 147 |
# File 'lib/rubysketch/window.rb', line 145 def up?() @type == :up end |