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