Class: Elastics::Template::Api
- Inherits:
-
Elastics::Template
- Object
- Elastics::Template
- Elastics::Template::Api
- Defined in:
- lib/elastics/template/api.rb
Instance Attribute Summary collapse
-
#aliases ⇒ Object
readonly
Returns the value of attribute aliases.
-
#references ⇒ Object
readonly
Returns the value of attribute references.
Attributes inherited from Elastics::Template
Attributes included from Common
#data, #name, #partials, #tags
Instance Method Summary collapse
-
#initialize(method, path, data = nil, *vars) ⇒ Api
constructor
A new instance of Api.
Methods inherited from Elastics::Template
#render, #to_a, #to_source, variables
Methods included from Common
Methods included from Logger
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
#aliases ⇒ Object (readonly)
Returns the value of attribute aliases.
5 6 7 |
# File 'lib/elastics/template/api.rb', line 5 def aliases @aliases end |
#references ⇒ Object (readonly)
Returns the value of attribute references.
5 6 7 |
# File 'lib/elastics/template/api.rb', line 5 def references @references end |