Class: Chef::Knife::RoleFromFile
- Defined in:
- lib/chef/knife/chop/role_from_file.rb
Instance Method Summary collapse
-
#initialize(argv = []) ⇒ RoleFromFile
constructor
——————————————————————————————————————– Create a new instance of the current class configured for the given arguments and options.
- #run ⇒ Object
Constructor Details
#initialize(argv = []) ⇒ RoleFromFile
Create a new instance of the current class configured for the given arguments and options
11 12 13 14 15 |
# File 'lib/chef/knife/chop/role_from_file.rb', line 11 def initialize(argv=[]) super(argv) @rsrctype = 'role' @location = 'roles' end |
Instance Method Details
#run ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/chef/knife/chop/role_from_file.rb', line 17 def run @name_args.each do |arg| updated = loader.load_from("roles", arg) updated.save output(format_for_display(updated)) if config[:print_after] ui.info("Updated Role #{updated.name}!") end end |