Class: EpomRails::ConfigGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/epom_rails/config/config_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_epom_rails_fileObject



5
6
7
8
9
10
11
12
13
# File 'lib/generators/epom_rails/config/config_generator.rb', line 5

def copy_epom_rails_file
    template 'epom_rails.rb', 'config/initializers/epom_rails.rb'
    if File.exist?('.gitignore')
    	File.open('.gitignore','a'){|f| f.write("\nconfig/initializers/epom_rails.rb")}
    end
    if File.exist?('../../.gitignore')
    	File.open('../../.gitignore','a'){|f| f.write("\ntest/dummy/config/initializers/epom_rails.rb")}
    end
end

#epom_generatorObject



15
16
17
# File 'lib/generators/epom_rails/config/config_generator.rb', line 15

def epom_generator
	generate 'epom:config'
end