Module: FeatureBox::Generators::GeneratorBase::ClassMethods

Defined in:
lib/generators/feature_box/generator_base.rb

Instance Method Summary collapse

Instance Method Details

#next_migration_number(path) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/generators/feature_box/generator_base.rb', line 10

def next_migration_number(path)
  unless @prev_migration_nr
    @prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
  else
    @prev_migration_nr += 1
  end
  @prev_migration_nr.to_s
end