Sha256: 61438c43349fb40431b1a69b871aa84aaefc722c6b8c168af95a3db28dc87813
Contents?: true
Size: 1.15 KB
Versions: 3
Compression:
Stored size: 1.15 KB
Contents
module CloudSesame module Query module Domain class Block extend ClassSpecific include DSL::AppliedFilterQuery include DSL::BlockStyledOperators include DSL::Operators include DSL::RangeHelper include DSL::ScopeAccessors include DSL::BindCaller include DSL::KGramPhraseMethods include DSL::AnyTermMethods after_construct { |_, field_accessor| include field_accessor } attr_reader :_caller, :_context, :_scopes def initialize(_caller, _context) self._caller = _caller @_context = _context @_scopes = [] 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
CloudSesame-0.9.3 | lib/cloud_sesame/query/domain/block.rb |
CloudSesame-0.9.2 | lib/cloud_sesame/query/domain/block.rb |
CloudSesame-0.9.1 | lib/cloud_sesame/query/domain/block.rb |