Class: QED::Template
- Inherits:
-
Object
- Object
- QED::Template
- Defined in:
- lib/qedoc/document.rb
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.
212 213 214 215 216 217 |
# File 'lib/qedoc/document.rb', line 212 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.
209 210 211 |
# File 'lib/qedoc/document.rb', line 209 def css @css end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
207 208 209 |
# File 'lib/qedoc/document.rb', line 207 def spec @spec end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
208 209 210 |
# File 'lib/qedoc/document.rb', line 208 def title @title end |
Instance Method Details
#parse_template ⇒ Object
219 220 221 222 |
# File 'lib/qedoc/document.rb', line 219 def parse_template erb = ERB.new(@template) erb.result(binding) end |