Class: Packr::Engine
- Inherits:
-
Object
- Object
- Packr::Engine
- Defined in:
- lib/packr/engine.rb
Instance Method Summary collapse
-
#initialize ⇒ Engine
constructor
A new instance of Engine.
- #pack(script, options = {}) ⇒ Object
Constructor Details
Instance Method Details
#pack(script, options = {}) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/packr/engine.rb', line 11 def pack(script, = {}) script = @minifier.minify(script) script = @shrinker.shrink(script, [:protect]) if [:shrink_vars] script = @privates.encode(script) if [:private] script = @base62.encode(script) if [:base62] script end |