Class: QED::Template
Overview
Document Template
Instance Attribute Summary collapse
-
#css ⇒ Object
readonly
Returns the value of attribute css.
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(template, spec, title, css) ⇒ Template
constructor
A new instance of Template.
- #parse_template ⇒ Object
Constructor Details
#initialize(template, spec, title, css) ⇒ Template
Returns a new instance of Template.
270 271 272 273 274 275 |
# File 'lib/qed/document.rb', line 270 def initialize(template, spec, title, css) @template = template @spec = spec @title = title @css = css end |
Instance Attribute Details
#css ⇒ Object (readonly)
Returns the value of attribute css.
267 268 269 |
# File 'lib/qed/document.rb', line 267 def css @css end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
265 266 267 |
# File 'lib/qed/document.rb', line 265 def spec @spec end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
266 267 268 |
# File 'lib/qed/document.rb', line 266 def title @title end |
Instance Method Details
#parse_template ⇒ Object
277 278 279 280 |
# File 'lib/qed/document.rb', line 277 def parse_template erb = ERB.new(@template) erb.result(binding) end |