Class: Stencil::Template::State

Inherits:
Object
  • Object
show all
Defined in:
lib/stencil/template.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, &file_opener) ⇒ State

Returns a new instance of State.



126
127
128
129
# File 'lib/stencil/template.rb', line 126

def initialize(data, &file_opener)
  @data = data
  @file_opener = file_opener
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



135
136
137
# File 'lib/stencil/template.rb', line 135

def data
  @data
end

Instance Method Details

#get_template(path) ⇒ Object



131
132
133
# File 'lib/stencil/template.rb', line 131

def get_template(path)
  Template::file(path, &@file_opener)
end