Class: SlashMigrate::Configuration
- Inherits:
-
Object
- Object
- SlashMigrate::Configuration
- Defined in:
- lib/slash_migrate/configuration.rb
Overview
Host apps tune the engine through SlashMigrate.configure. Both values are read at route-draw time (see Engine), so a host initializer can override them even though the engine mounts itself.
Instance Attribute Summary collapse
-
#enabled_environments ⇒ Object
Returns the value of attribute enabled_environments.
-
#mount_path ⇒ Object
Returns the value of attribute mount_path.
Instance Method Summary collapse
- #enabled_in?(env) ⇒ Boolean
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 |
# File 'lib/slash_migrate/configuration.rb', line 8 def initialize @mount_path = "/rails/migrate" @enabled_environments = ["development"] end |
Instance Attribute Details
#enabled_environments ⇒ Object
Returns the value of attribute enabled_environments.
6 7 8 |
# File 'lib/slash_migrate/configuration.rb', line 6 def enabled_environments @enabled_environments end |
#mount_path ⇒ Object
Returns the value of attribute mount_path.
6 7 8 |
# File 'lib/slash_migrate/configuration.rb', line 6 def mount_path @mount_path end |
Instance Method Details
#enabled_in?(env) ⇒ Boolean
13 14 15 |
# File 'lib/slash_migrate/configuration.rb', line 13 def enabled_in?(env) enabled_environments.map(&:to_s).include?(env.to_s) end |