Class: Bellejs

Inherits:
Object
  • Object
show all
Defined in:
lib/bellejs.rb,
lib/bellejs/version.rb

Constant Summary collapse

VERSION =
"0.3.1"

Instance Method Summary collapse

Constructor Details

#initialize(input_file, output_file = nil, minify = false) ⇒ Bellejs

Returns a new instance of Bellejs.



7
8
9
10
11
12
13
14
# File 'lib/bellejs.rb', line 7

def initialize(input_file, output_file = nil, minify = false)
  @local_dir = File.dirname(input_file)
  @output_path = get_output_path(input_file, output_file)
  @file_contents = get_file_contents(input_file)
  @compiled_js = compile(@file_contents)
  uglify_js if minify
  write
end