Class: Docwatch::Renderer::Html

Inherits:
Docwatch::Renderer show all
Defined in:
lib/docwatch/renderer/html.rb

Instance Method Summary collapse

Methods inherited from Docwatch::Renderer

by_filetype, extension, #initialize, #js, #to_html

Constructor Details

This class inherits a constructor from Docwatch::Renderer

Instance Method Details

#bodyObject



13
14
15
# File 'lib/docwatch/renderer/html.rb', line 13

def body
    doc.at('body')&.inner_html
end

#docObject



5
6
7
# File 'lib/docwatch/renderer/html.rb', line 5

def doc
    Nokogiri::HTML(contents)
end

#headObject



9
10
11
# File 'lib/docwatch/renderer/html.rb', line 9

def head
    doc.at('head')&.inner_html
end