Class: Chef::Fork::Commands::Role

Inherits:
Noop
  • Object
show all
Defined in:
lib/chef/fork/commands/role.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
25
26
27
28
# File 'lib/chef/fork/commands/role.rb', line 12

def run(args=[])
  rest = order_args(args)
  case rest.first
  when "edit"
    role_edit(rest.slice(1..-1) || [])
  when "from"
    role_from(rest.slice(1..-1) || [])
  when "list"
    role_list(rest.slice(1..-1) || [])
  when "show"
    role_show(rest.slice(1..-1) || [])
  when "upload"
    role_upload(rest.slice(1..-1) || [])
  else
    raise(NameError.new(rest.inspect))
  end
end