Class: PuppetGenerator::PuppetObjects::Role
- Inherits:
-
Object
- Object
- PuppetGenerator::PuppetObjects::Role
- Includes:
- PuppetGenerator::PuppetHelper
- Defined in:
- lib/puppet_generator/puppet_objects/role.rb
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#includes ⇒ Object
readonly
Returns the value of attribute includes.
-
#module_name ⇒ Object
readonly
Returns the value of attribute module_name.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(entry, module_name, class_name) ⇒ Role
constructor
A new instance of Role.
- #suggested_file_name ⇒ Object
Methods included from PuppetGenerator::PuppetHelper
#puppet_class_name, #puppet_manifest_path, #puppet_module_name, #puppet_module_path
Constructor Details
#initialize(entry, module_name, class_name) ⇒ Role
Returns a new instance of Role.
9 10 11 12 13 14 15 |
# File 'lib/puppet_generator/puppet_objects/role.rb', line 9 def initialize(entry, module_name, class_name) @path = entry[:name] @module_name = entry.fetch(:module_name, module_name ) @class_name = entry.fetch(:class_name, class_name ) @includes = entry[:includes] || [] end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
7 8 9 |
# File 'lib/puppet_generator/puppet_objects/role.rb', line 7 def class_name @class_name end |
#includes ⇒ Object (readonly)
Returns the value of attribute includes.
7 8 9 |
# File 'lib/puppet_generator/puppet_objects/role.rb', line 7 def includes @includes end |
#module_name ⇒ Object (readonly)
Returns the value of attribute module_name.
7 8 9 |
# File 'lib/puppet_generator/puppet_objects/role.rb', line 7 def module_name @module_name end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/puppet_generator/puppet_objects/role.rb', line 7 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
7 8 9 |
# File 'lib/puppet_generator/puppet_objects/role.rb', line 7 def path @path end |
Instance Method Details
#suggested_file_name ⇒ Object
17 18 19 |
# File 'lib/puppet_generator/puppet_objects/role.rb', line 17 def suggested_file_name puppet_manifest_path( path ) end |