Class: Gosu::Button
- Inherits:
-
Object
- Object
- Gosu::Button
- Defined in:
- lib/gosu_android/input/input.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #<(other) ⇒ Object
-
#==(other) ⇒ Object
Tests whether two Buttons identify the same physical button.
- #>(other) ⇒ Object
-
#initialize(*args) ⇒ Button
constructor
A new instance of Button.
Constructor Details
permalink #initialize(*args) ⇒ Button
Returns a new instance of Button.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/gosu_android/input/input.rb', line 6 def initialize(*args) case args.length when 0 @id = NoButton when 1 @id = args[0] else raise ArgumentError end end |
Instance Attribute Details
permalink #id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/gosu_android/input/input.rb', line 5 def id @id end |
Instance Method Details
permalink #<(other) ⇒ Object
[View source]
26 27 28 |
# File 'lib/gosu_android/input/input.rb', line 26 def < other self.id < other.id end |
permalink #==(other) ⇒ Object
Tests whether two Buttons identify the same physical button.
18 19 20 |
# File 'lib/gosu_android/input/input.rb', line 18 def == other self.id == other.id end |
permalink #>(other) ⇒ Object
[View source]
22 23 24 |
# File 'lib/gosu_android/input/input.rb', line 22 def > other self.id > other.id end |