Class: QED::Template

Inherits:
Object
  • Object
show all
Defined in:
lib/qed/document.rb

Overview

Document Template

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(template, spec, title, css) ⇒ Template

Returns a new instance of Template.



173
174
175
176
177
178
# File 'lib/qed/document.rb', line 173

def initialize(template, spec, title, css)
  @template = template
  @spec     = spec
  @title    = title
  @css      = css
end

Instance Attribute Details

#cssObject (readonly)

Returns the value of attribute css.



170
171
172
# File 'lib/qed/document.rb', line 170

def css
  @css
end

#specObject (readonly)

Returns the value of attribute spec.



168
169
170
# File 'lib/qed/document.rb', line 168

def spec
  @spec
end

#titleObject (readonly)

Returns the value of attribute title.



169
170
171
# File 'lib/qed/document.rb', line 169

def title
  @title
end

Instance Method Details

#parse_templateObject



180
181
182
183
# File 'lib/qed/document.rb', line 180

def parse_template
  erb = ERB.new(@template)
  erb.result(binding)
end