Class: Trinity::Renderer::HTML
- Inherits:
-
Trinity::Renderer
- Object
- Trinity::Renderer
- Trinity::Renderer::HTML
- Defined in:
- lib/trinity/renderer/html.rb
Instance Method Summary
Methods inherited from Trinity::Renderer
content_type, for, #initialize, #render, #status
Constructor Details
This class inherits a constructor from Trinity::Renderer
Instance Method Details
- (Object) content
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/trinity/renderer/html.rb', line 13 def content xml = Markaby::Builder.new(:indent => 2) xml.instruct! xml.declare! :DOCTYPE, :html, :PUBLIC, "-//W3C//DTD XHTML+RDFa 1.0//EN", "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd" xml.html(:xmlns => 'http://www.w3.org/1999/xhtml') do head do title "Trinity" # TODO end body do h1 "Hello, world!" # TODO end end xml.to_s end |
- (Object) headers
9 10 11 |
# File 'lib/trinity/renderer/html.rb', line 9 def headers super.merge({'Content-Type' => self.class.content_type}) end |