Module: CoffeeScript::Engines::Transmogrify

Defined in:
lib/transmogrify.rb

Class Method Summary collapse

Class Method Details

.compile(script, options = {}) ⇒ Object



65
66
67
68
69
70
71
72
73
74
75
# File 'lib/transmogrify.rb', line 65

def compile(script, options = {})
  begin
    ::Transmogrify.post(script)['output']
  rescue ::Transmogrify::TransmogrifyError => ex
    if ex.inner
      raise EngineError, ex.message
    else
      raise CompilationError, ex.message
    end
  end
end