Class: Dashed::Button
- Inherits:
-
Object
- Object
- Dashed::Button
- Defined in:
- lib/dashed/button.rb
Constant Summary collapse
- TIMEOUT =
45- SNAPLENGTH =
65535
Instance Attribute Summary collapse
-
#last_press ⇒ Object
readonly
Returns the value of attribute last_press.
-
#mac_address ⇒ Object
readonly
Returns the value of attribute mac_address.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize(mac_address, interface, timeout = TIMEOUT) ⇒ Button
constructor
A new instance of Button.
- #on_press ⇒ Object
Constructor Details
#initialize(mac_address, interface, timeout = TIMEOUT) ⇒ Button
Returns a new instance of Button.
13 14 15 16 17 18 |
# File 'lib/dashed/button.rb', line 13 def initialize(mac_address, interface, timeout = TIMEOUT) @mac_address = mac_address @interface = interface @timeout = timeout @last_press = nil end |
Instance Attribute Details
#last_press ⇒ Object (readonly)
Returns the value of attribute last_press.
11 12 13 |
# File 'lib/dashed/button.rb', line 11 def last_press @last_press end |
#mac_address ⇒ Object (readonly)
Returns the value of attribute mac_address.
11 12 13 |
# File 'lib/dashed/button.rb', line 11 def mac_address @mac_address end |
#timeout ⇒ Object
Returns the value of attribute timeout.
10 11 12 |
# File 'lib/dashed/button.rb', line 10 def timeout @timeout end |