Method: Puppet::Interface::ActionManager#script
- Defined in:
- lib/vendor/puppet/interface/action_manager.rb
#script(name, &block) ⇒ Object
This is the short-form of an action definition; it doesn’t use the builder, just creates the action directly from the block.
22 23 24 25 26 |
# File 'lib/vendor/puppet/interface/action_manager.rb', line 22 def script(name, &block) @actions ||= {} raise "Action #{name} already defined for #{self}" if action?(name) @actions[name] = Puppet::Interface::Action.new(self, name, :when_invoked => block) end |