Class: Hue::CLI::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/hue/cli/command.rb

Instance Method Summary collapse

Constructor Details

#initializeCommand

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