Class: Storing::Selector

Inherits:
AbstractSelector show all
Defined in:
lib/storing/selector.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mapper, store, conditions = {}) ⇒ Selector

Returns a new instance of Selector.



12
13
14
15
16
# File 'lib/storing/selector.rb', line 12

def initialize mapper, store, conditions={}
	@mapper = mapper
	@store = store
	@conditions = conditions
end

Instance Attribute Details

#conditionsObject (readonly)

Returns the value of attribute conditions.



10
11
12
# File 'lib/storing/selector.rb', line 10

def conditions
  @conditions
end

#mapperObject (readonly)

Returns the value of attribute mapper.



10
11
12
# File 'lib/storing/selector.rb', line 10

def mapper
  @mapper
end

#storeObject (readonly)

Returns the value of attribute store.



10
11
12
# File 'lib/storing/selector.rb', line 10

def store
  @store
end

Class Method Details

.select(mapper, store, conditions = {}) ⇒ Object



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

def self.select mapper, store, conditions={}
	new(mapper, store, conditions).select
end

Instance Method Details

#selectObject



18
19
20
# File 'lib/storing/selector.rb', line 18

def select
	mapper.parse store.select(conditions)
end