Class: ActiveStatus::Configuration
- Inherits:
-
Object
- Object
- ActiveStatus::Configuration
- Defined in:
- lib/active_status/configuration.rb
Instance Attribute Summary collapse
-
#checks ⇒ Object
Returns the value of attribute checks.
-
#error_code ⇒ Object
Returns the value of attribute error_code.
-
#success_code ⇒ Object
Returns the value of attribute success_code.
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Instance Method Summary collapse
- #check(name, &block) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #reset! ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 |
# File 'lib/active_status/configuration.rb', line 5 def initialize reset! end |
Instance Attribute Details
#checks ⇒ Object
Returns the value of attribute checks.
3 4 5 |
# File 'lib/active_status/configuration.rb', line 3 def checks @checks end |
#error_code ⇒ Object
Returns the value of attribute error_code.
3 4 5 |
# File 'lib/active_status/configuration.rb', line 3 def error_code @error_code end |
#success_code ⇒ Object
Returns the value of attribute success_code.
3 4 5 |
# File 'lib/active_status/configuration.rb', line 3 def success_code @success_code end |
#verbose ⇒ Object
Returns the value of attribute verbose.
3 4 5 |
# File 'lib/active_status/configuration.rb', line 3 def verbose @verbose end |
Instance Method Details
#check(name, &block) ⇒ Object
16 17 18 |
# File 'lib/active_status/configuration.rb', line 16 def check(name, &block) @checks[name] = block end |
#reset! ⇒ Object
9 10 11 12 13 14 |
# File 'lib/active_status/configuration.rb', line 9 def reset! @checks = {} @verbose = false @error_code = 503 @success_code = 200 end |