Sha256: 2c58e22f1d7d6970bdd92814cb436723801d4e3c86284197011aa95bf65bb32a
Contents?: true
Size: 1.04 KB
Versions: 4
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
4 entries across 4 versions & 1 rubygems