Module: Rcb::Configurations
- Defined in:
- lib/rcb/configuration.rb
Class Method Summary collapse
- .add(config) ⇒ Object
- .clear ⇒ Object
- .for(tag, open_condition: nil, reset_timeout_msec: nil) ⇒ Object
Class Method Details
.add(config) ⇒ Object
98 99 100 101 102 |
# File 'lib/rcb/configuration.rb', line 98 def self.add(config) # return if @configs.include?(config.tag) # overwrite @configs[config.tag] = config end |
.clear ⇒ Object
104 105 106 |
# File 'lib/rcb/configuration.rb', line 104 def self.clear @configs = {} end |
.for(tag, open_condition: nil, reset_timeout_msec: nil) ⇒ Object
92 93 94 95 96 |
# File 'lib/rcb/configuration.rb', line 92 def self.for(tag, open_condition: nil, reset_timeout_msec: nil) @configs[tag.to_s.to_sym] || Config.create(tag, open_condition: open_condition, reset_timeout_msec: reset_timeout_msec) end |