Class: CacheStache::Configuration::KeyspaceBuilder
- Inherits:
-
Object
- Object
- CacheStache::Configuration::KeyspaceBuilder
- Defined in:
- lib/cache_stache/configuration.rb
Instance Method Summary collapse
-
#initialize(keyspace) ⇒ KeyspaceBuilder
constructor
A new instance of KeyspaceBuilder.
- #label(value) ⇒ Object
- #match(regex) ⇒ Object
Constructor Details
#initialize(keyspace) ⇒ KeyspaceBuilder
Returns a new instance of KeyspaceBuilder.
110 111 112 |
# File 'lib/cache_stache/configuration.rb', line 110 def initialize(keyspace) @keyspace = keyspace end |
Instance Method Details
#label(value) ⇒ Object
114 115 116 |
# File 'lib/cache_stache/configuration.rb', line 114 def label(value) @keyspace.label = value end |
#match(regex) ⇒ Object
118 119 120 121 |
# File 'lib/cache_stache/configuration.rb', line 118 def match(regex) raise Error, "match requires a Regexp argument, got #{regex.class}" unless regex.is_a?(Regexp) @keyspace.pattern = regex end |