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.



203
204
205
206
207
208
# File 'lib/qed/document.rb', line 203

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.



200
201
202
# File 'lib/qed/document.rb', line 200

def css
  @css
end

#specObject (readonly)

Returns the value of attribute spec.



198
199
200
# File 'lib/qed/document.rb', line 198

def spec
  @spec
end

#titleObject (readonly)

Returns the value of attribute title.



199
200
201
# File 'lib/qed/document.rb', line 199

def title
  @title
end

Instance Method Details

#parse_templateObject



210
211
212
213
# File 'lib/qed/document.rb', line 210

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