class Retrospec::Puppet::Generators::NodeGenerator
Public Class Methods
generate_spec_files(module_path, config_data)
click to toggle source
# File lib/retrospec/plugins/v1/plugin/generators/node_generator.rb, line 22 def self.generate_spec_files(module_path, config_data) files = [] manifest_files(module_path).each do |file| nodedef = new(module_path, config_data.merge({:manifest_file => file})) next unless nodedef.resource_type == ::Puppet::Pops::Model::NodeDefinition files << nodedef.generate_spec_file end files end
new(module_path, spec_object = {})
click to toggle source
retrospec will initilalize this class so its up to you to set any additional variables you need to get the job done.
Calls superclass method
Retrospec::Puppet::Generators::ResourceBaseGenerator::new
# File lib/retrospec/plugins/v1/plugin/generators/node_generator.rb, line 12 def initialize(module_path, spec_object = {}) super @singular_name = 'node' @plural_name = 'nodes' end
Public Instance Methods
spec_template_file()
click to toggle source
# File lib/retrospec/plugins/v1/plugin/generators/node_generator.rb, line 18 def spec_template_file 'node_spec.rb.retrospec.erb' end