Class: QED::Template

Inherits:
Object
  • Object
show all
Defined in:
lib/qedoc/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.



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

#cssObject (readonly)

Returns the value of attribute css.



209
210
211
# File 'lib/qedoc/document.rb', line 209

def css
  @css
end

#specObject (readonly)

Returns the value of attribute spec.



207
208
209
# File 'lib/qedoc/document.rb', line 207

def spec
  @spec
end

#titleObject (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_templateObject



219
220
221
222
# File 'lib/qedoc/document.rb', line 219

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