Sha256: 85c81f38950f37f6777efe1399223acc7ec81d1cdacbdc3b7247ec4c915e73e9
Contents?: true
Size: 1.04 KB
Versions: 10
Compression:
Stored size: 1.04 KB
Contents
module CloudSesame module Query module Domain class Block include DSL::AppliedFilterQuery include DSL::BlockStyledOperators include DSL::FieldAccessors include DSL::Operators include DSL::RangeHelper include DSL::ScopeAccessors include DSL::BindCaller attr_reader :_caller, :_context, :_scopes def initialize(_caller, _context) @_caller = _caller @_context = _context @_scopes = [] _bind_caller_instance_variables end def _eval(node, _scope, _return = _scope, &block) _scopes.push node # must build the subtree before push (<<) to it's # parents (_scope) in order for the parent properly # propagate message down to all the children. # =============================================== instance_eval &block _scope << node _scopes.pop _scope.is_a?(AST::Root) ? _return : node end def _scope _scopes[-1] end def _return _scope end def _block_domain(block) self end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems