Module: Card::Set::Type::CoffeeScript::Format
- Extended by:
- AbstractFormat
- Defined in:
- tmpsets/set/mod014-machines/type/coffee_script.rb
Instance Method Summary collapse
Instance Method Details
#compile_coffee(script) ⇒ Object
25 26 27 28 29 30 31 |
# File 'tmpsets/set/mod014-machines/type/coffee_script.rb', line 25 def compile_coffee script ::CoffeeScript.compile script rescue => e line_nr = e.to_s.match(/\[stdin\]:(\d*)/)&.capture(0)&.to_i line = script.lines[line_nr - 1] if line_nr raise Card::Error, "CoffeeScript::Error (#{card.name}): #{e.}: #{line}" end |