Class: Elastics::Template::Api

Inherits:
Elastics::Template show all
Defined in:
lib/elastics/template/api.rb

Instance Attribute Summary collapse

Attributes inherited from Elastics::Template

#method, #path

Attributes included from Common

#data, #name, #partials, #tags

Instance Method Summary collapse

Methods inherited from Elastics::Template

#render, #to_a, #to_source, variables

Methods included from Common

#interpolate_partials, #setup

Methods included from Logger

#caller_line

Constructor Details

#initialize(method, path, data = nil, *vars) ⇒ Api

Returns a new instance of Api.



7
8
9
10
11
# File 'lib/elastics/template/api.rb', line 7

def initialize(method, path, data=nil, *vars)
  super
  @references          = @instance_vars.delete(:REFERENCES) || {}
  @aliases             = @references['aliases'] || []
end

Instance Attribute Details

#aliasesObject (readonly)

Returns the value of attribute aliases.



5
6
7
# File 'lib/elastics/template/api.rb', line 5

def aliases
  @aliases
end

#referencesObject (readonly)

Returns the value of attribute references.



5
6
7
# File 'lib/elastics/template/api.rb', line 5

def references
  @references
end