Class: Roleplayer::Generators::Base
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Roleplayer::Generators::Base
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/roleplayer.rb
Overview
:nodoc:
Direct Known Subclasses
Class Method Summary collapse
-
.next_migration_number(dirname) ⇒ Object
Required interface for Rails::Generators::Migration.
- .source_root ⇒ Object
Class Method Details
.next_migration_number(dirname) ⇒ Object
Required interface for Rails::Generators::Migration
15 16 17 18 19 20 21 |
# File 'lib/generators/roleplayer.rb', line 15 def self.next_migration_number(dirname) #:nodoc: if ActiveRecord::Base. Time.now.utc.strftime("%Y%m%d%H%M%S") else "%.3d" % (current_migration_number(dirname) + 1) end end |
.source_root ⇒ Object
10 11 12 |
# File 'lib/generators/roleplayer.rb', line 10 def self.source_root @_roleplayer_source_root ||= File.(File.join(File.dirname(__FILE__), 'roleplayer', generator_name, 'templates')) end |