Class: JayAPI::Elasticsearch::Stats::Nodes

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/jay_api/elasticsearch/stats/nodes.rb

Overview

Provides access to the list of nodes returned by Elasticsearch’s Stats API

Instance Method Summary collapse

Constructor Details

#initialize(nodes) ⇒ Nodes

Returns a new instance of Nodes.

Parameters:

  • nodes (Hash)

    Information about the nodes in the Elasticsearch cluster.



18
19
20
# File 'lib/jay_api/elasticsearch/stats/nodes.rb', line 18

def initialize(nodes)
  @nodes = nodes
end

Instance Method Details

#allEnumerator::Lazy<JayAPI::Elasticsearch::Stats::Node>

Returns A lazy enumerator of Node objects, one for each of the nodes.

Returns:



24
25
26
# File 'lib/jay_api/elasticsearch/stats/nodes.rb', line 24

def all
  @all ||= with_lazy_instantiation { nodes }
end