Class: Genit::ScriptBuilder
- Inherits:
-
Relativizer
- Object
- BuilderBase
- Relativizer
- Genit::ScriptBuilder
- Defined in:
- lib/genit/builders/script_builder.rb
Overview
Modify script tags.
Instance Method Summary collapse
-
#build_for_page(page_name) ⇒ Object
Public: Relativize the <script src=“”> tags of a particular page.
Methods inherited from Relativizer
Methods inherited from BuilderBase
#build, get_number_of_base_dirs, #initialize
Constructor Details
This class inherits a constructor from Genit::BuilderBase
Instance Method Details
#build_for_page(page_name) ⇒ Object
Public: Relativize the <script src=“”> tags of a particular page.
page_name - The string filename of the page.
Returns the modified Nokogiri::XML::Document
13 14 15 |
# File 'lib/genit/builders/script_builder.rb', line 13 def build_for_page page_name build page_name, @document.css("script") end |