Class: Elastic::Results::Metric

Inherits:
Base
  • Object
show all
Defined in:
lib/elastic/results/metric.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#traverse

Methods included from Support::Traversable

#pick_nodes, #traverse

Constructor Details

#initialize(_value) ⇒ Metric

Returns a new instance of Metric.



5
6
7
# File 'lib/elastic/results/metric.rb', line 5

def initialize(_value)
  @value = _value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



3
4
5
# File 'lib/elastic/results/metric.rb', line 3

def value
  @value
end

Instance Method Details

#as_valueObject



9
10
11
# File 'lib/elastic/results/metric.rb', line 9

def as_value
  @value
end