Method: Puppet::Module::Task#initialize
- Defined in:
- lib/puppet/module/task.rb
#initialize(pup_module, task_name, module_executables, metadata_file = nil) ⇒ Task
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
file paths must be relative to the modules task directory
228 229 230 231 232 233 234 235 236 237 238 239 |
# File 'lib/puppet/module/task.rb', line 228 def initialize(pup_module, task_name, module_executables, = nil) unless Puppet::Module::Task.is_task_name?(task_name) raise InvalidName, _("Task names must start with a lowercase letter and be composed of only lowercase letters, numbers, and underscores") end name = task_name == "init" ? pup_module.name : "#{pup_module.name}::#{task_name}" @module = pup_module @name = name @metadata_file = @module_executables = module_executables || [] end |