Module: LHS::Record::Chainable::ClassMethods
- Defined in:
- lib/lhs/concerns/record/chainable.rb
Instance Method Summary collapse
- #handle(error_class, handler) ⇒ Object
- #limit(argument = nil) ⇒ Object
- #options(hash = nil) ⇒ Object
- #page(page) ⇒ Object
- #per(limit) ⇒ Object
- #where(hash = nil) ⇒ Object
Instance Method Details
#handle(error_class, handler) ⇒ Object
34 35 36 |
# File 'lib/lhs/concerns/record/chainable.rb', line 34 def handle(error_class, handler) Chain.new(self, ErrorHandling.new(error_class => handler)) end |
#limit(argument = nil) ⇒ Object
30 31 32 |
# File 'lib/lhs/concerns/record/chainable.rb', line 30 def limit(argument = nil) Chain.new(self, Pagination.new(per: argument)) end |
#options(hash = nil) ⇒ Object
18 19 20 |
# File 'lib/lhs/concerns/record/chainable.rb', line 18 def (hash = nil) Chain.new(self, Option.new(hash)) end |
#page(page) ⇒ Object
22 23 24 |
# File 'lib/lhs/concerns/record/chainable.rb', line 22 def page(page) Chain.new(self, Pagination.new(page: page)) end |
#per(limit) ⇒ Object
26 27 28 |
# File 'lib/lhs/concerns/record/chainable.rb', line 26 def per(limit) Chain.new(self, Pagination.new(per: limit)) end |