Class: Hyperion::Riak::OptimizedRangeFilters
- Inherits:
-
Object
- Object
- Hyperion::Riak::OptimizedRangeFilters
- Defined in:
- lib/hyperion/riak/optimized_range_filters.rb
Instance Method Summary collapse
- #greater_than_filter ⇒ Object
-
#initialize(filters) ⇒ OptimizedRangeFilters
constructor
A new instance of OptimizedRangeFilters.
- #less_than_filter ⇒ Object
- #remaining_filters ⇒ Object
Constructor Details
#initialize(filters) ⇒ OptimizedRangeFilters
Returns a new instance of OptimizedRangeFilters.
4 5 6 |
# File 'lib/hyperion/riak/optimized_range_filters.rb', line 4 def initialize(filters) @filters = filters end |
Instance Method Details
#greater_than_filter ⇒ Object
16 17 18 |
# File 'lib/hyperion/riak/optimized_range_filters.rb', line 16 def greater_than_filter @greater_than_filter ||= find_first_match(greater_than_candidates, less_than_candidates) end |
#less_than_filter ⇒ Object
12 13 14 |
# File 'lib/hyperion/riak/optimized_range_filters.rb', line 12 def less_than_filter @less_than_filter ||= find_first_match(less_than_candidates, greater_than_candidates) end |
#remaining_filters ⇒ Object
8 9 10 |
# File 'lib/hyperion/riak/optimized_range_filters.rb', line 8 def remaining_filters @remaining_filters ||= @filters - [less_than_filter, greater_than_filter] end |