Class: JefferiesTube::Configuration
- Inherits:
-
Object
- Object
- JefferiesTube::Configuration
- Defined in:
- lib/jefferies_tube.rb
Instance Attribute Summary collapse
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#prompt_name ⇒ Object
Returns the value of attribute prompt_name.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/jefferies_tube.rb', line 21 def initialize if defined?(Rails) @environment = ::Rails.env.downcase || nil @prompt_name = if ::Rails::VERSION::MAJOR >= 6 ::Rails.application.class.module_parent_name || nil else ::Rails.application.class.parent_name || nil end else @environment = "development" @prompt_name = "JefferiesTube" end end |
Instance Attribute Details
#environment ⇒ Object
Returns the value of attribute environment.
18 19 20 |
# File 'lib/jefferies_tube.rb', line 18 def environment @environment end |
#prompt_name ⇒ Object
Returns the value of attribute prompt_name.
19 20 21 |
# File 'lib/jefferies_tube.rb', line 19 def prompt_name @prompt_name end |