Sha256: e24c70e863c4dd59ec0f4de43b8004c2d88795880c3af6d440b96215865c3259

Contents?: true

Size: 269 Bytes

Versions: 1

Compression:

Stored size: 269 Bytes

Contents

module Elastic::Results
  class Bucket < Aggregations
    attr_reader :key

    def initialize(_key, _aggs)
      @key = _key
      super _aggs
    end

    def as_value
      # TODO: return aggregation value if configured as single bucket
      self
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
elastic-rails-0.5.0 lib/elastic/results/bucket.rb