Class: Stupidedi::Writer::Claredi

Inherits:
Object
  • Object
show all
Defined in:
lib/stupidedi/writer/claredi.rb

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ Claredi

Returns a new instance of Claredi.



7
8
9
# File 'lib/stupidedi/writer/claredi.rb', line 7

def initialize(node)
  @node = node
end

Instance Method Details

#write(out = StringIO.new) ⇒ String

Returns:

  • (String)


12
13
14
15
16
17
18
19
20
21
# File 'lib/stupidedi/writer/claredi.rb', line 12

def write(out = StringIO.new)
  out << %Q(<html lang="en"><head>)
  out << %Q(<meta charset="iso-8859-1">)
  out << style
  out << js
  out << "</head><body>"
  build(@node, out)
  out << "</body></html>"
  out
end