class ElasticsearchQuery::FilterFormatter::Match

Public Instance Methods

to_hash() click to toggle source
# File lib/elasticsearch_query/filter_formatter/match.rb, line 4
def to_hash
  { match: { @name => value } }
end

Private Instance Methods

array() click to toggle source
# File lib/elasticsearch_query/filter_formatter/match.rb, line 18
def array
  @array ||= @value.split(",")
end
array?() click to toggle source
# File lib/elasticsearch_query/filter_formatter/match.rb, line 14
def array?
  array.length > 1
end
value() click to toggle source
# File lib/elasticsearch_query/filter_formatter/match.rb, line 10
def value
  array? ? array : @value
end