Module: HtmlPress
- Defined in:
- lib/html_press.rb,
lib/html_press/html.rb,
lib/html_press/version.rb,
lib/html_press/html_entities.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.8.1"
Class Method Summary collapse
-
.compress(text, options = {}) ⇒ Object
for backward compatibility.
- .entities_compressor(text) ⇒ Object
- .js_compressor(text, options = nil) ⇒ Object
- .press(text, options = {}) ⇒ Object
Class Method Details
.compress(text, options = {}) ⇒ Object
for backward compatibility
14 15 16 |
# File 'lib/html_press.rb', line 14 def self.compress(text, = {}) HtmlPress::Html.new().press text end |
.entities_compressor(text) ⇒ Object
34 35 36 |
# File 'lib/html_press/html_entities.rb', line 34 def self.entities_compressor (text) Entities.new.minify(text) end |
.js_compressor(text, options = nil) ⇒ Object
18 19 20 21 22 |
# File 'lib/html_press.rb', line 18 def self.js_compressor (text, = nil) ||= {} [:inline_script] = true MultiJs.compile(text, ).gsub(/;$/,'') end |