Class: AridCache::Store::Blueprint

Inherits:
Struct
  • Object
show all
Defined in:
lib/arid_cache/store.rb

Overview

AridCache::Store::Blueprint

Stores options and blocks that are used to generate results for finds and counts.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass, key, opts = {}, proc = nil) ⇒ Blueprint



10
11
12
13
14
15
# File 'lib/arid_cache/store.rb', line 10

def initialize(klass, key, opts={}, proc=nil)
  self.key = key
  self.klass = klass
  self.proc = proc
  self.opts = opts
end

Instance Attribute Details

#keyObject

Returns the value of attribute key



8
9
10
# File 'lib/arid_cache/store.rb', line 8

def key
  @key
end

#klassObject

Returns the value of attribute klass



8
9
10
# File 'lib/arid_cache/store.rb', line 8

def klass
  @klass
end

#optsObject

Returns the value of attribute opts



8
9
10
# File 'lib/arid_cache/store.rb', line 8

def opts
  @opts
end

#proc(object = nil) ⇒ Object

Returns the value of attribute proc



8
9
10
# File 'lib/arid_cache/store.rb', line 8

def proc
  @proc
end