Class: Gyruby::Remote::MouseButton
- Inherits:
-
Object
- Object
- Gyruby::Remote::MouseButton
- Defined in:
- lib/gyruby/remote.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#block ⇒ Object
Returns the value of attribute block.
-
#event ⇒ Object
Returns the value of attribute event.
-
#frequency ⇒ Object
Returns the value of attribute frequency.
-
#last ⇒ Object
Returns the value of attribute last.
-
#press ⇒ Object
Returns the value of attribute press.
Instance Method Summary collapse
-
#initialize(options) ⇒ MouseButton
constructor
A new instance of MouseButton.
- #release(event) ⇒ Object
Constructor Details
#initialize(options) ⇒ MouseButton
Returns a new instance of MouseButton.
26 27 28 29 30 31 |
# File 'lib/gyruby/remote.rb', line 26 def initialize() @event, @block, @frequency = .delete(:event), .delete(:block), .delete(:frequency) @last = nil @action = :press @press = self end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
25 26 27 |
# File 'lib/gyruby/remote.rb', line 25 def action @action end |
#block ⇒ Object
Returns the value of attribute block.
25 26 27 |
# File 'lib/gyruby/remote.rb', line 25 def block @block end |
#event ⇒ Object
Returns the value of attribute event.
25 26 27 |
# File 'lib/gyruby/remote.rb', line 25 def event @event end |
#frequency ⇒ Object
Returns the value of attribute frequency.
25 26 27 |
# File 'lib/gyruby/remote.rb', line 25 def frequency @frequency end |
#last ⇒ Object
Returns the value of attribute last.
25 26 27 |
# File 'lib/gyruby/remote.rb', line 25 def last @last end |
#press ⇒ Object
Returns the value of attribute press.
25 26 27 |
# File 'lib/gyruby/remote.rb', line 25 def press @press end |
Instance Method Details
#release(event) ⇒ Object
32 33 34 35 36 37 |
# File 'lib/gyruby/remote.rb', line 32 def release(event) rval = self.clone rval.action = :release rval.event = event return rval end |