Sha256: 46239e191fdbc8906ef7ba8c4fbd373d7c69b247a4a02d7fd282f45d5c2dc17d

Contents?: true

Size: 803 Bytes

Versions: 24

Compression:

Stored size: 803 Bytes

Contents

module CloudSesame
  module Query
    module AST
      module Abstract
        class SingleExpressionOperator < Operator

          DETAILED = false

          attr_accessor :child

          def <<(object)
            self.child = object
          end

          def applied(included = true)
            child.applied(included)
          end

          def compile(_detailed = nil)
            if child && (compiled = child.compile operator_detailed) && !compiled.empty?
              "(#{ symbol  }#{ boost } #{ compiled })"
            end
          end

          def is_for(field, options = {})
            child.is_for field, options if child
          end

          private

          def operator_detailed
            self.class::DETAILED
          end

        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
CloudSesame-1.0.1 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-1.0.0 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-0.9.4 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-0.9.3 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-0.9.2 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-0.9.1 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-0.9.0 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-0.8.3 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-0.8.2 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-0.8.1 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-0.8.0 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-0.7.13 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-0.7.12 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-0.7.11 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-0.7.10 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-0.7.9 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-0.7.8 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-0.7.7 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-0.7.5 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb
CloudSesame-0.7.4 lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb