Class: Sequel::Generators::Base
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Sequel::Generators::Base
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/sequel.rb
Overview
:nodoc:
Direct Known Subclasses
MigrationGenerator, ModelGenerator, ObserverGenerator, SessionMigrationGenerator
Class Method Summary collapse
- .base_name ⇒ Object
-
.next_migration_number(dirname) ⇒ Object
Implement the required interface for Rails::Generators::Migration.
- .source_root ⇒ Object
Class Method Details
.base_name ⇒ Object
10 11 12 |
# File 'lib/generators/sequel.rb', line 10 def self.base_name @_sequel_base_name ||= 'sequel' end |
.next_migration_number(dirname) ⇒ Object
Implement the required interface for Rails::Generators::Migration.
22 23 24 25 |
# File 'lib/generators/sequel.rb', line 22 def self.next_migration_number(dirname) #:nodoc: next_migration_number = current_migration_number(dirname) + 1 [Time.now.utc.strftime('%Y%m%d%H%M%S'), format('%.14d', next_migration_number)].max end |
.source_root ⇒ Object
14 15 16 17 18 |
# File 'lib/generators/sequel.rb', line 14 def self.source_root @_sequel_source_root ||= File.( "../#{base_name}/#{generator_name}/templates", __FILE__ ) end |