Class: PuppetGenerator::Task
- Inherits:
-
Object
- Object
- PuppetGenerator::Task
- Includes:
- PuppetHelper
- Defined in:
- lib/puppet_generator/task.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#meta ⇒ Object
readonly
Returns the value of attribute meta.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Task
constructor
A new instance of Task.
Methods included from PuppetHelper
#puppet_class_name, #puppet_manifest_path, #puppet_module_name, #puppet_module_path
Constructor Details
#initialize(options = {}) ⇒ Task
Returns a new instance of Task.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/puppet_generator/task.rb', line 9 def initialize(={}) @meta = {} @body = nil @meta[:source] = [:source] @meta[:destination] = [:destination] @meta[:module] = puppet_module_name( [:module] ) @meta[:class] = puppet_class_name( [:class] ) @meta[:requested_import_filter] = [:import_filter] @meta[:requested_export_filter] = [:export_filter] @meta[:requested_actions] = [:action] @meta[:logging_mode] = log_level() @meta[:command] = [:command] @meta[:template_tagged_with] = [:template_tagged_with].split(/:/).map(&:to_sym) if [:template_tagged_with] @meta[:debug] = true if [:debug] end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
7 8 9 |
# File 'lib/puppet_generator/task.rb', line 7 def body @body end |
#meta ⇒ Object (readonly)
Returns the value of attribute meta.
6 7 8 |
# File 'lib/puppet_generator/task.rb', line 6 def @meta end |