Class: ActiveStatus::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/active_status/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



5
6
7
# File 'lib/active_status/configuration.rb', line 5

def initialize
  reset!
end

Instance Attribute Details

#checksObject

Returns the value of attribute checks.



3
4
5
# File 'lib/active_status/configuration.rb', line 3

def checks
  @checks
end

#error_codeObject

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_codeObject

Returns the value of attribute success_code.



3
4
5
# File 'lib/active_status/configuration.rb', line 3

def success_code
  @success_code
end

#verboseObject

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