Class: Jax::Generators::RailsBase
- Inherits:
-
NamedBase
- Object
- Rails::Generators::NamedBase
- NamedBase
- Jax::Generators::RailsBase
- Defined in:
- lib/generators/jax/base/rails_base.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args = [], options = {}, config = {}) ⇒ RailsBase
constructor
A new instance of RailsBase.
Methods included from SourceRoot
Methods included from CoffeeGenerator
Constructor Details
#initialize(args = [], options = {}, config = {}) ⇒ RailsBase
Returns a new instance of RailsBase.
15 16 17 18 19 20 21 |
# File 'lib/generators/jax/base/rails_base.rb', line 15 def initialize(args = [], = {}, config = {}) super if self.[:rails] && equiv = rails_equivalent args << "--skip-namespace" # otherwise everything ends up in jax/, the opposite of what we want ::Rails::Generators.invoke(equiv, args, config) end end |
Class Method Details
.rails_equivalent(&block) ⇒ Object
8 9 10 |
# File 'lib/generators/jax/base/rails_base.rb', line 8 def self.rails_equivalent(&block) self.rails_equivalent_block = block end |