Class: Sequel::Generators::ObserverGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/generators/sequel/observer/observer_generator.rb

Instance Method Summary collapse

Methods inherited from Base

base_name, next_migration_number, source_root

Instance Method Details

#create_observer_fileObject



8
9
10
11
12
13
# File 'lib/generators/sequel/observer/observer_generator.rb', line 8

def create_observer_file
  template(
    'observer.rb.erb',
    File.join('app', 'models', class_path, "#{file_name}_observer.rb")
  )
end