Class: NewRemote::UnitCommand
- Inherits:
-
Object
- Object
- NewRemote::UnitCommand
- Defined in:
- lib/new_remote.rb
Instance Method Summary collapse
- #dim(level) ⇒ Object
-
#initialize(transmitter, device) ⇒ UnitCommand
constructor
A new instance of UnitCommand.
- #off ⇒ Object
- #on ⇒ Object
Constructor Details
#initialize(transmitter, device) ⇒ UnitCommand
Returns a new instance of UnitCommand.
8 9 10 11 |
# File 'lib/new_remote.rb', line 8 def initialize(transmitter, device) @transmitter = transmitter @device = device end |
Instance Method Details
#dim(level) ⇒ Object
21 22 23 |
# File 'lib/new_remote.rb', line 21 def dim(level) @transmitter.send_unit_dim(@device, level) end |
#off ⇒ Object
17 18 19 |
# File 'lib/new_remote.rb', line 17 def off @transmitter.send_unit(@device, false) end |
#on ⇒ Object
13 14 15 |
# File 'lib/new_remote.rb', line 13 def on @transmitter.send_unit(@device, true) end |