Module: Esperanto::Source

Defined in:
lib/esperanto/source.rb,
lib/esperanto/source/version.rb

Constant Summary collapse

VERSION =
'0.7.1'

Class Method Summary collapse

Class Method Details

.bundled_path_for(filename) ⇒ Object



6
7
8
# File 'lib/esperanto/source.rb', line 6

def bundled_path_for(filename)
  File.expand_path("../../../vendor/#{filename}", __FILE__)
end

.bundled_pathsObject



10
11
12
13
14
15
# File 'lib/esperanto/source.rb', line 10

def bundled_paths
  %w(
    base64.js
    esperanto.browser.js
  ).map {|js| bundled_path_for(js) }
end

.bundled_sourceObject



17
18
19
# File 'lib/esperanto/source.rb', line 17

def bundled_source
  'var window = this; ' + bundled_paths.map {|path| File.read(path) }.join
end