Method: Retrospec::Puppet::Generators::FunctionGenerator#main_class_name
- Defined in:
- lib/retrospec/plugins/v1/plugin/generators/function_generator.rb
#main_class_name ⇒ String
Returns - returns the main class name by reading the init.pp file.
37 38 39 |
# File 'lib/retrospec/plugins/v1/plugin/generators/function_generator.rb', line 37 def main_class_name File.read(File.join(module_path, 'manifests', 'init.pp')).scan(/\s*class\s(\w+)/).flatten.first || '' end |