Class: Cachext::Breaker

Inherits:
Object
  • Object
show all
Defined in:
lib/cachext/breaker.rb

Defined Under Namespace

Classes: WithKey

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Breaker

Returns a new instance of Breaker.



7
8
9
# File 'lib/cachext/breaker.rb', line 7

def initialize(config)
  @config = config
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



5
6
7
# File 'lib/cachext/breaker.rb', line 5

def config
  @config
end

Instance Method Details

#for(key) ⇒ Object



11
12
13
# File 'lib/cachext/breaker.rb', line 11

def for(key)
  WithKey.new(config, key)
end