Class: Normatron::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/normatron/install_generator.rb

Overview

Creates all necessary files to run Normatron in your Ruby On Rails project.

Even when required, Normatron doesn’t include his functionalities into your ORM automatically. It behaves this way to avoid some potential issues.

Using this generator, you can get fully control of Normatron behavior through initialization file.

These files includes:

  • config/initializers/normatron.rb

Usage

$ rails generator normatron:install

Instance Method Summary collapse

Instance Method Details

#copy_filesObject

Copy files from templates to their respective destination.

These files includes:

  • config/initializers/normatron.rb

25
26
27
# File 'lib/generators/normatron/install_generator.rb', line 25

def copy_files
  copy_file "normatron.rb", "config/initializers/normatron.rb"
end