Module: Cequel::Record::Scoped::ClassMethods
- Extended by:
- Forwardable
- Defined in:
- lib/cequel/record/scoped.rb
Overview
Scoping-related methods for Cequel::Record classes
Instance Method Summary collapse
Instance Method Details
#current_scope ⇒ Object
24 25 26 |
# File 'lib/cequel/record/scoped.rb', line 24 def current_scope delegating_scope || RecordSet.new(self) end |
#with_scope(record_set) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/cequel/record/scoped.rb', line 29 def with_scope(record_set) previous_scope = delegating_scope self.delegating_scope = record_set yield ensure self.delegating_scope = previous_scope end |