Class: JayAPI::Elasticsearch::Stats::Index
- Inherits:
-
Object
- Object
- JayAPI::Elasticsearch::Stats::Index
- Defined in:
- lib/jay_api/elasticsearch/stats/index.rb,
lib/jay_api/elasticsearch/stats/index/totals.rb
Overview
Holds information about an Elasticsearch Index.
Defined Under Namespace
Classes: Totals
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, data) ⇒ Index
constructor
A new instance of Index.
-
#totals ⇒ JayAPI::Elasticsearch::Stats::Index::Totals
Information about the index’s total metrics.
Constructor Details
#initialize(name, data) ⇒ Index
Returns a new instance of Index.
14 15 16 17 |
# File 'lib/jay_api/elasticsearch/stats/index.rb', line 14 def initialize(name, data) @name = name @data = data end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/jay_api/elasticsearch/stats/index.rb', line 10 def name @name end |
Instance Method Details
#totals ⇒ JayAPI::Elasticsearch::Stats::Index::Totals
Returns Information about the index’s total metrics.
22 23 24 |
# File 'lib/jay_api/elasticsearch/stats/index.rb', line 22 def totals @totals ||= ::JayAPI::Elasticsearch::Stats::Index::Totals.new(data.fetch('total')) end |