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.
174 175 176 177 178 179 |
# File 'lib/qed/document.rb', line 174 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.
171 172 173 |
# File 'lib/qed/document.rb', line 171 def css @css end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
169 170 171 |
# File 'lib/qed/document.rb', line 169 def spec @spec end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
170 171 172 |
# File 'lib/qed/document.rb', line 170 def title @title end |
Instance Method Details
#parse_template ⇒ Object
181 182 183 184 |
# File 'lib/qed/document.rb', line 181 def parse_template erb = ERB.new(@template) erb.result(binding) end |