Class: Intermodal::API::Configuration
- Inherits:
-
Rails::Railtie::Configuration
- Object
- Rails::Railtie::Configuration
- Intermodal::API::Configuration
- Defined in:
- lib/intermodal/api/configuration.rb
Instance Attribute Summary collapse
-
#middleware ⇒ Object
Returns the middleware stack for the engine.
Instance Method Summary collapse
-
#generators {|@generators| ... } ⇒ Object
Holds generators configuration:.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 |
# File 'lib/intermodal/api/configuration.rb', line 10 def initialize super() @generators = app_generators.dup end |
Instance Attribute Details
#middleware ⇒ Object
Returns the middleware stack for the engine.
16 17 18 |
# File 'lib/intermodal/api/configuration.rb', line 16 def middleware @middleware ||= Rails::Configuration::MiddlewareStackProxy.new end |
Instance Method Details
#generators {|@generators| ... } ⇒ Object
Holds generators configuration:
config.generators do |g|
g.orm :data_mapper, migration: true
g.template_engine :haml
g.test_framework :rspec
end
If you want to disable color in console, do:
config.generators.colorize_logging = false
32 33 34 35 36 |
# File 'lib/intermodal/api/configuration.rb', line 32 def generators #:nodoc: @generators ||= Rails::Configuration::Generators.new yield(@generators) if block_given? @generators end |