Class: Hue::CLI::Command
- Inherits:
-
Object
- Object
- Hue::CLI::Command
- Defined in:
- lib/hue/cli/command.rb
Direct Known Subclasses
Hue::CLI::Commands::Delete, Hue::CLI::Commands::Light, Hue::CLI::Commands::Lights, Hue::CLI::Commands::Register
Instance Method Summary collapse
- #execute(*args) ⇒ Object
-
#initialize ⇒ Command
constructor
A new instance of Command.
Constructor Details
#initialize ⇒ Command
Returns a new instance of Command.
7 8 9 10 |
# File 'lib/hue/cli/command.rb', line 7 def initialize set_bridge parse_methods end |
Instance Method Details
#execute(*args) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/hue/cli/command.rb', line 12 def execute(*args) if args.size > 0 send_method(*args) else @bridge.print_state end end |