Module: NumberedRelationships::AmountFilters
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/numbered_relationships.rb
Instance Method Summary collapse
- #with_at_least(n, filters = [], assoc) ⇒ Object
- #with_at_most(n, filters = [], assoc) ⇒ Object
- #with_exactly(n, filters = [], assoc) ⇒ Object
- #with_less_than(n, filters = [], assoc) ⇒ Object
- #with_more_than(n, filters = [], assoc) ⇒ Object
- #without(n, filters = [], assoc) ⇒ Object
Instance Method Details
#with_at_least(n, filters = [], assoc) ⇒ Object
7 8 9 |
# File 'lib/numbered_relationships.rb', line 7 def with_at_least(n, filters=[], assoc) (n, assoc, '>=', filters, self) end |
#with_at_most(n, filters = [], assoc) ⇒ Object
11 12 13 |
# File 'lib/numbered_relationships.rb', line 11 def with_at_most(n, filters=[], assoc) (n, assoc, '<=', filters, self) end |
#with_exactly(n, filters = [], assoc) ⇒ Object
15 16 17 |
# File 'lib/numbered_relationships.rb', line 15 def with_exactly(n, filters=[], assoc) (n, assoc, '=', filters, self) end |
#with_less_than(n, filters = [], assoc) ⇒ Object
27 28 29 |
# File 'lib/numbered_relationships.rb', line 27 def with_less_than(n, filters=[], assoc) (n, assoc, '<', filters, self) end |
#with_more_than(n, filters = [], assoc) ⇒ Object
23 24 25 |
# File 'lib/numbered_relationships.rb', line 23 def with_more_than(n, filters=[], assoc) (n, assoc, '>', filters, self) end |
#without(n, filters = [], assoc) ⇒ Object
19 20 21 |
# File 'lib/numbered_relationships.rb', line 19 def without(n, filters=[], assoc) (n, assoc, '<>', filters, self) end |