Sha256: e63f2d642b94c9b4536339a963614420016ac3034bcfccc9b5d363f350c84848
Contents?: true
Size: 420 Bytes
Versions: 19
Compression:
Stored size: 420 Bytes
Contents
module Elastic::Types module FacetedType def fields(*_fields) raise ArgumentError, 'must provide at least a field name' if _fields.empty? options = {} options = _fields.pop if _fields.last.is_a? Hash _fields.each { |name| field(name, options) } end def field(_name, _options = {}) pre_definition.register_field Elastic::Fields::Value.new(_name, _options) end end end
Version data entries
19 entries across 19 versions & 1 rubygems