Class: LogStash::Search::FacetResult::Histogram

Inherits:
Entry
  • Object
show all
Defined in:
lib/logstash/search/facetresult/histogram.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#countObject

Returns the value of attribute count.



10
11
12
# File 'lib/logstash/search/facetresult/histogram.rb', line 10

def count
  @count
end

#keyObject

The name or key for this result.



7
8
9
# File 'lib/logstash/search/facetresult/histogram.rb', line 7

def key
  @key
end

#meanObject

Returns the value of attribute mean.



8
9
10
# File 'lib/logstash/search/facetresult/histogram.rb', line 8

def mean
  @mean
end

#totalObject

Returns the value of attribute total.



9
10
11
# File 'lib/logstash/search/facetresult/histogram.rb', line 9

def total
  @total
end

Instance Method Details

#to_json(*args) ⇒ Object

sometimes a parent call to to_json calls us with args?



13
14
15
16
17
18
19
20
# File 'lib/logstash/search/facetresult/histogram.rb', line 13

def to_json(*args)
  return {
    "key" => @key,
    "mean" => @mean,
    "total" => @total,
    "count" => @count,
  }.to_json
end