Module: BriskBills::GeneratorBaseExtension

Defined in:
lib/generators/generator_base_extension.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
7
8
# File 'lib/generators/generator_base_extension.rb', line 4

def self.included(base)
  base.class_eval %{
    alias_method_chain :existing_migrations, :extensions
  }
end

Instance Method Details

#existing_migrations_with_extensions(file_name) ⇒ Object



10
11
12
# File 'lib/generators/generator_base_extension.rb', line 10

def existing_migrations_with_extensions(file_name)
  Dir.glob("#{destination_path(@migration_directory)}/[0-9]*_*.rb").grep(/[0-9]+_#{file_name}.rb$/)
end