Class: Marilyn::Generators::EmailValidatorGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/marilyn/email_validator/email_validator_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_validator_fileObject



9
10
11
# File 'lib/generators/marilyn/email_validator/email_validator_generator.rb', line 9

def copy_validator_file
  copy_file('lib/email_format_validator.rb')
end

#extend_environmentObject



13
14
15
# File 'lib/generators/marilyn/email_validator/email_validator_generator.rb', line 13

def extend_environment
  append_to_file('config/environment.rb', "require File.dirname(__FILE__) + '/../lib/email_format_validator'\n")
end