Class: Cuporter::Document::Html
- Inherits:
-
Nokogiri::XML::Document
- Object
- Nokogiri::XML::Document
- Cuporter::Document::Html
- Defined in:
- lib/cuporter/document/html_document.rb
Instance Attribute Summary collapse
-
#assets_base_path ⇒ Object
Returns the value of attribute assets_base_path.
-
#assets_src ⇒ Object
Returns the value of attribute assets_src.
-
#link_assets ⇒ Object
Returns the value of attribute link_assets.
-
#view ⇒ Object
Returns the value of attribute view.
Instance Method Summary collapse
- #add_report(node) ⇒ Object
-
#to_html(options = {}) ⇒ Object
remove CDATA tags so CSS works.
Instance Attribute Details
#assets_base_path ⇒ Object
Returns the value of attribute assets_base_path.
5 6 7 |
# File 'lib/cuporter/document/html_document.rb', line 5 def assets_base_path @assets_base_path end |
#assets_src ⇒ Object
Returns the value of attribute assets_src.
5 6 7 |
# File 'lib/cuporter/document/html_document.rb', line 5 def assets_src @assets_src end |
#link_assets ⇒ Object
Returns the value of attribute link_assets.
5 6 7 |
# File 'lib/cuporter/document/html_document.rb', line 5 def link_assets @link_assets end |
#view ⇒ Object
Returns the value of attribute view.
5 6 7 |
# File 'lib/cuporter/document/html_document.rb', line 5 def view @view end |
Instance Method Details
#add_report(node) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/cuporter/document/html_document.rb', line 11 def add_report(node) root << head(node['title']) body = new_node('body') body << node root << body end |
#to_html(options = {}) ⇒ Object
remove CDATA tags so CSS works
19 20 21 |
# File 'lib/cuporter/document/html_document.rb', line 19 def to_html( = {}) to_xhtml().gsub(/(<!\[CDATA\[|\]\]>)/,'') end |