Class: Consul::Async::ConsulTemplateMembers

Inherits:
ConsulTemplateAbstractArray show all
Defined in:
lib/consul/async/consul_template.rb

Overview

List of serf members of the whole cluster

Instance Attribute Summary

Attributes inherited from ConsulTemplateAbstract

#endpoint, #result, #seen_at

Instance Method Summary collapse

Methods inherited from ConsulTemplateAbstract

#_seen_at, #initialize, #method_missing, #ready?, #respond_to_missing?

Constructor Details

This class inherits a constructor from Consul::Async::ConsulTemplateAbstract

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Consul::Async::ConsulTemplateAbstract

Instance Method Details

#result_delegateObject



668
669
670
671
672
673
674
675
676
677
678
# File 'lib/consul/async/consul_template.rb', line 668

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