Class: Consul::Async::ConsulTemplateMembers
- Inherits:
-
ConsulTemplateAbstractArray
- Object
- ConsulTemplateAbstract
- ConsulTemplateAbstractArray
- Consul::Async::ConsulTemplateMembers
- Defined in:
- lib/consul/async/consul_template.rb
Overview
List of serf members of the whole cluster
Instance Attribute Summary
Attributes inherited from ConsulTemplateAbstract
Instance Method Summary collapse
-
#initialize(consul_endpoint) ⇒ ConsulTemplateMembers
constructor
A new instance of ConsulTemplateMembers.
- #result_delegate ⇒ Object
Methods inherited from ConsulTemplateAbstract
#_seen_at, #method_missing, #ready?, #respond_to_missing?
Constructor Details
#initialize(consul_endpoint) ⇒ ConsulTemplateMembers
Returns a new instance of ConsulTemplateMembers.
689 690 691 |
# File 'lib/consul/async/consul_template.rb', line 689 def initialize(consul_endpoint) super(consul_endpoint) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Consul::Async::ConsulTemplateAbstract
Instance Method Details
#result_delegate ⇒ Object
693 694 695 696 697 698 699 700 701 702 703 |
# File 'lib/consul/async/consul_template.rb', line 693 def result_delegate return @cached_result if @cached_json == result.json new_res = [] result.json.each do |v| new_res << SerfMember.new(v) end @cached_result = new_res @cached_json = result.json new_res end |