Class: Storing::Selector
- Inherits:
-
AbstractSelector
- Object
- AbstractSelector
- Storing::Selector
- Defined in:
- lib/storing/selector.rb
Instance Attribute Summary collapse
-
#conditions ⇒ Object
readonly
Returns the value of attribute conditions.
-
#mapper ⇒ Object
readonly
Returns the value of attribute mapper.
-
#store ⇒ Object
readonly
Returns the value of attribute store.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(mapper, store, conditions = {}) ⇒ Selector
constructor
A new instance of Selector.
- #select ⇒ Object
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
#conditions ⇒ Object (readonly)
Returns the value of attribute conditions.
10 11 12 |
# File 'lib/storing/selector.rb', line 10 def conditions @conditions end |
#mapper ⇒ Object (readonly)
Returns the value of attribute mapper.
10 11 12 |
# File 'lib/storing/selector.rb', line 10 def mapper @mapper end |
#store ⇒ Object (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
#select ⇒ Object
18 19 20 |
# File 'lib/storing/selector.rb', line 18 def select mapper.parse store.select(conditions) end |