Class: RailsConsoleShield::Configuration
- Inherits:
-
Object
- Object
- RailsConsoleShield::Configuration
- Defined in:
- lib/rails_console_shield/configuration.rb
Instance Attribute Summary collapse
-
#environment_prompt_colors ⇒ Object
Returns the value of attribute environment_prompt_colors.
-
#shield_environments ⇒ Object
Returns the value of attribute shield_environments.
-
#warn_text ⇒ Object
Returns the value of attribute warn_text.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/rails_console_shield/configuration.rb', line 5 def initialize self.environment_prompt_colors = { development: :green, staging: :yellow, production: :red, } self.warn_text =" WARNING: YOU ARE USING RAILS CONSOLE IN PRODUCTION!\n Changing data can cause serious data loss.\n Make sure you know what you're doing.\n TEXT\n\n self.shield_environments = %w[production]\nend\n" |
Instance Attribute Details
#environment_prompt_colors ⇒ Object
Returns the value of attribute environment_prompt_colors.
3 4 5 |
# File 'lib/rails_console_shield/configuration.rb', line 3 def environment_prompt_colors @environment_prompt_colors end |
#shield_environments ⇒ Object
Returns the value of attribute shield_environments.
3 4 5 |
# File 'lib/rails_console_shield/configuration.rb', line 3 def shield_environments @shield_environments end |
#warn_text ⇒ Object
Returns the value of attribute warn_text.
3 4 5 |
# File 'lib/rails_console_shield/configuration.rb', line 3 def warn_text @warn_text end |