Sha256: dcbcbd70eef90f957924f1c516fff1b5b7b98e15b2d3c21edbda0672bd87c9a6
Contents?: true
Size: 904 Bytes
Versions: 9
Compression:
Stored size: 904 Bytes
Contents
module CloudSesame module Query module DSL module BlockMethods attr_accessor :orphan_node # CLAUSE: AND # ========================================= def and(options = {}, &block) block_style_dsl AST::And, options, &block end alias_method :all, :and alias_method :and!, :and # CLAUSE: OR # ========================================= def or(options = {}, &block) block_style_dsl AST::Or, options, &block end alias_method :any, :or alias_method :or!, :or private def block_style_dsl(klass, options, &block) node = klass.new dsl_context, options, &block if block_given? dsl_scope << node dsl_return node else return_chaining_relation(node) end end def return_chaining_relation(node) AST::BlockChainingRelation.new(dsl_scope, dsl_return, node) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems