class Elasticsearch::API::Response::Description
Attributes
field[R]
operation[R]
operator[R]
raw[R]
type[R]
value[R]
Public Class Methods
new(raw:, type:, operator:, operation: nil, field: nil, value: nil)
click to toggle source
# File lib/elasticsearch/api/response/description.rb, line 7 def initialize(raw:, type:, operator:, operation: nil, field: nil, value: nil) @raw = raw @type = type @operator = operator @operation = operation @field = field @value = value end
Public Instance Methods
as_json()
click to toggle source
# File lib/elasticsearch/api/response/description.rb, line 16 def as_json { type: type, operator: operator, operation: operation, field: field, value: value }.delete_if { |k, v| v.nil? } end