Module: RoutesAlerts

Defined in:
lib/routes_alerts.rb,
lib/routes_alerts/configuration.rb

Defined Under Namespace

Classes: Base, Configuration, Count, Duration, Metrics, RouteInfo, SuccessRate

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



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

def configuration
  @configuration
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Yields:



9
10
11
12
# File 'lib/routes_alerts.rb', line 9

def self.configure
  self.configuration ||= RoutesAlerts::Configuration.new
  yield(configuration)
end

.create_metrics!Object



14
15
16
17
18
# File 'lib/routes_alerts.rb', line 14

def self.create_metrics!
  configuration.routes.each do |route|
    RoutesAlerts::Metrics.new(configuration).create_metrics!(route)
  end
end