Class: ElasticSearch::GetIndexTemplatesRequest
- Defined in:
- lib/jruby-elasticsearch/templaterequest.rb
Overview
class ElasticSearch::DeleteIndexTemplateRequest
Instance Method Summary collapse
- #execute(&block) ⇒ Object
-
#initialize(client, template_name) ⇒ GetIndexTemplatesRequest
constructor
A new instance of GetIndexTemplatesRequest.
- #with(&block) ⇒ Object
Methods inherited from Request
Constructor Details
#initialize(client, template_name) ⇒ GetIndexTemplatesRequest
Returns a new instance of GetIndexTemplatesRequest.
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/jruby-elasticsearch/templaterequest.rb', line 45 def initialize(client, template_name) @client = client @template_name = template_name begin @prep = org.elasticsearch.action.admin.indices.template.get.GetIndexTemplatesRequestBuilder.new(@client.admin().indices(), @template_name) rescue NameError puts "Could not create GetIndexTemplateRequestBuilder. Error => " + NameError.to_s end super() end |
Instance Method Details
#execute(&block) ⇒ Object
70 71 72 73 74 |
# File 'lib/jruby-elasticsearch/templaterequest.rb', line 70 def execute(&block) use_callback(&block) if block_given? action = @prep.get return action end |
#with(&block) ⇒ Object
57 58 59 60 |
# File 'lib/jruby-elasticsearch/templaterequest.rb', line 57 def with(&block) instance_eval(&block) return self end |