Class: Blueprinter::Generators::BlueprintGenerator Private

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/blueprinter/blueprint_generator.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#optionsObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
# File 'lib/generators/blueprinter/blueprint_generator.rb', line 8

def options
  @options
end

Instance Method Details

#create_blueprintObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



38
39
40
# File 'lib/generators/blueprinter/blueprint_generator.rb', line 38

def create_blueprint
  template 'blueprint.rb', File.join(path, "#{file_path}_blueprint.rb")
end

#ensure_blueprint_dirObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



34
35
36
# File 'lib/generators/blueprinter/blueprint_generator.rb', line 34

def ensure_blueprint_dir
  FileUtils.mkdir_p(path) unless File.directory?(path)
end