Sha256: 7c34aaa37ce9af61954c9a8a93a327882b13ae986a2e4f2283ddacfb2ec96170

Contents?: true

Size: 234 Bytes

Versions: 1

Compression:

Stored size: 234 Bytes

Contents

module Inquisitio
  class Facets < Hash

    def initialize(facets)
      super
      hash = facets.nil? ? {} : JSON.parse(facets.to_json, symbolize_names: true)
      merge!(hash)
    end

    def fields
      keys
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
inquisitio-2.1.2 lib/inquisitio/facets.rb