Class: EasyType::Generators::RegularTypeGenerator
- Defined in:
- lib/easy_type/generators/regular_type_generator.rb
Overview
Docs
Constant Summary collapse
- PROVIDER_TEMPLATE =
'regular_type.rb.erb'.freeze
- TYPE_TEMPLATE =
'regular_type_provider.rb.erb'.freeze
Instance Method Summary collapse
-
#initialize(type_name, options) ⇒ RegularTypeGenerator
constructor
A new instance of RegularTypeGenerator.
-
#run ⇒ Object
Run the scaffolder It created the directories and the nescessary files.
Methods inherited from Base
#create_provider_directory, #create_type_directory, load
Methods included from Helpers
#camelize, #convert_csv_data_to_hash, #get_puppet_file, included
Methods included from PathHelpers
#attribute_path, #create_directory, #create_source, included, #modulepath, #name_attribute_path, #provider_directory, #provider_path, #puppet_lib, #puppet_lib?, #save_file, #shared_attribute_path, #template_path, #type_attribute_directory, #type_directory, #type_path, #type_shared_directory, #write_file
Constructor Details
#initialize(type_name, options) ⇒ RegularTypeGenerator
Returns a new instance of RegularTypeGenerator.
13 14 15 16 17 |
# File 'lib/easy_type/generators/regular_type_generator.rb', line 13 def initialize(type_name, ) super(type_name, ) @provider = .fetch(:provider) { 'default_provider' } @description = .fetch(:description) { 'A custom type' } end |
Instance Method Details
#run ⇒ Object
Run the scaffolder It created the directories and the nescessary files
23 24 25 26 27 |
# File 'lib/easy_type/generators/regular_type_generator.rb', line 23 def run super create_type_source create_provider_source end |