Class: JSMin

Inherits:
Object
  • Object
show all
Defined in:
lib/jsmin.rb

Constant Summary collapse

EOF =
-1

Instance Method Summary collapse

Constructor Details

#initialize(original) ⇒ JSMin

Returns a new instance of JSMin.



39
40
41
# File 'lib/jsmin.rb', line 39

def initialize(original)
  @original = original
end

Instance Method Details

#minifyObject



43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/jsmin.rb', line 43

def minify
  @output = ''

  @in = StringIO.new(@original)
  @out = StringIO.new(@output)

  @the_a = ""
  @the_b = ""

  jsmin

  @output
end