Class: RailsHealthChecks::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



8
9
10
11
12
13
14
# File 'lib/rails_health_checks/configuration.rb', line 8

def initialize
  @checks = [:database]
  @timeout = 5
  @allowed_ips = nil
  @token = nil
  @authenticate_block = nil
end

Instance Attribute Details

#allowed_ipsObject

Returns the value of attribute allowed_ips.



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

def allowed_ips
  @allowed_ips
end

#authenticate_blockObject (readonly)

Returns the value of attribute authenticate_block.



6
7
8
# File 'lib/rails_health_checks/configuration.rb', line 6

def authenticate_block
  @authenticate_block
end

#checksObject

Returns the value of attribute checks.



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

def checks
  @checks
end

#timeoutObject

Returns the value of attribute timeout.



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

def timeout
  @timeout
end

#tokenObject

Returns the value of attribute token.



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

def token
  @token
end

Instance Method Details

#authenticate(&block) ⇒ Object



16
17
18
# File 'lib/rails_health_checks/configuration.rb', line 16

def authenticate(&block)
  @authenticate_block = block
end