Class: BuckKnife::Commands::AddRole
- Inherits:
-
Struct
- Object
- Struct
- BuckKnife::Commands::AddRole
- Includes:
- Base
- Defined in:
- lib/buckknife/commands/add_role.rb
Instance Attribute Summary collapse
-
#node ⇒ Object
Returns the value of attribute node.
Instance Method Summary collapse
Methods included from Base
#base_run_list, #build_run_list, #to_s
Instance Attribute Details
#node ⇒ Object
Returns the value of attribute node
3 4 5 |
# File 'lib/buckknife/commands/add_role.rb', line 3 def node @node end |
Instance Method Details
#command ⇒ Object
6 7 8 9 10 |
# File 'lib/buckknife/commands/add_role.rb', line 6 def command node.run_list_items.map do |item| Command.new('knife').arg('node', 'run_list', 'add', node.name, item) end.join("\n") end |