Class: Chef::Fork::Commands::Node

Inherits:
Noop
  • Object
show all
Defined in:
lib/chef/fork/commands/node.rb

Instance Method Summary collapse

Methods inherited from Noop

#initialize

Constructor Details

This class inherits a constructor from Chef::Fork::Commands::Noop

Instance Method Details

#run(args = []) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/chef/fork/commands/node.rb', line 12

def run(args=[])
  rest = order_args(args)
  case rest.first
  when "edit"
    node_edit(rest.slice(1..-1) || [])
  when "list"
    node_list(rest.slice(1..-1) || [])
  when "show"
    node_show(rest.slice(1..-1) || [])
  else
    raise(NameError.new(@args.inspect))
  end
end