Sha256: 631dec48d662fd57b6791ba5ea30b969395c8e43782727141c9f9c178f5f94f0

Contents?: true

Size: 390 Bytes

Versions: 24

Compression:

Stored size: 390 Bytes

Contents

module CloudSesame
  module Query
    module Node
      class QueryOptionsField

        attr_reader :field, :weight

        def initialize(field, weight = nil)
          @field = field
          @weight = weight
        end

        def compile
          compiled = field.to_s
          compiled << '^' << weight.to_s if weight
          compiled
        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/node/query_options_field.rb
CloudSesame-1.0.0 lib/cloud_sesame/query/node/query_options_field.rb
CloudSesame-0.9.4 lib/cloud_sesame/query/node/query_options_field.rb
CloudSesame-0.9.3 lib/cloud_sesame/query/node/query_options_field.rb
CloudSesame-0.9.2 lib/cloud_sesame/query/node/query_options_field.rb
CloudSesame-0.9.1 lib/cloud_sesame/query/node/query_options_field.rb
CloudSesame-0.9.0 lib/cloud_sesame/query/node/query_options_field.rb
CloudSesame-0.8.3 lib/cloud_sesame/query/node/query_options_field.rb
CloudSesame-0.8.2 lib/cloud_sesame/query/node/query_options_field.rb
CloudSesame-0.8.1 lib/cloud_sesame/query/node/query_options_field.rb
CloudSesame-0.8.0 lib/cloud_sesame/query/node/query_options_field.rb
CloudSesame-0.7.13 lib/cloud_sesame/query/node/query_options_field.rb
CloudSesame-0.7.12 lib/cloud_sesame/query/node/query_options_field.rb
CloudSesame-0.7.11 lib/cloud_sesame/query/node/query_options_field.rb
CloudSesame-0.7.10 lib/cloud_sesame/query/node/query_options_field.rb
CloudSesame-0.7.9 lib/cloud_sesame/query/node/query_options_field.rb
CloudSesame-0.7.8 lib/cloud_sesame/query/node/query_options_field.rb
CloudSesame-0.7.7 lib/cloud_sesame/query/node/query_options_field.rb
CloudSesame-0.7.5 lib/cloud_sesame/query/node/query_options_field.rb
CloudSesame-0.7.4 lib/cloud_sesame/query/node/query_options_field.rb