Class: AppMonit::Rails::Config
- Inherits:
-
Object
- Object
- AppMonit::Rails::Config
- Defined in:
- lib/app_monit/rails/config.rb
Class Attribute Summary collapse
-
.enabled ⇒ Object
writeonly
Sets the attribute enabled.
- .name ⇒ Object
- .skipped_endpoints ⇒ Object
Class Method Summary collapse
Class Attribute Details
.enabled=(value) ⇒ Object (writeonly)
Sets the attribute enabled
5 6 7 |
# File 'lib/app_monit/rails/config.rb', line 5 def enabled=(value) @enabled = value end |
.name ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/app_monit/rails/config.rb', line 11 def name module_parent_name = if ::Rails::VERSION::MAJOR >= 6 ::Rails.application.class.module_parent_name else ::Rails.application.class.parent_name end @name.nil? ? module_parent_name : @name end |
.skipped_endpoints ⇒ Object
21 22 23 |
# File 'lib/app_monit/rails/config.rb', line 21 def skipped_endpoints @skipped_endpoints ||= [] end |
Class Method Details
.enabled? ⇒ Boolean
7 8 9 |
# File 'lib/app_monit/rails/config.rb', line 7 def enabled? @enabled.nil? ? ::Rails.env != 'test' : @enabled end |