class Rails::Generators::BluePrintGenerator

Public Instance Methods

create_behavior_files() click to toggle source
# File lib/generators/rails/blue_print_generator.rb, line 20
def create_behavior_files
  each_with_role do |role|
    template 'role.rb', File.join(
      'app/blue_prints', class_path, "#{file_name}_context", "#{role.underscore}.rb"
    )
  end
end
create_context_file() click to toggle source
# File lib/generators/rails/blue_print_generator.rb, line 14
def create_context_file
  template 'context.rb', File.join(
    'app/blue_prints', class_path, "#{file_name}_context.rb"
  )
end

Private Instance Methods

active_ifs() click to toggle source
# File lib/generators/rails/blue_print_generator.rb, line 32
def active_ifs
  options.fetch('active_if').map do |active_if|
    ":#{active_if}"
  end
end
parent_class_name() click to toggle source
# File lib/generators/rails/blue_print_generator.rb, line 38
def parent_class_name
  options.fetch('parent') { 'BluePrint::Context' }
end