Module: Card::Set::Abstract::CoffeeScript::Format
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod019-script/abstract/02_coffee_script.rb
Instance Method Summary collapse
Instance Method Details
#bare_compile ⇒ Object
25 26 27 |
# File 'platypus/tmp/set/gem-defaults/mod019-script/abstract/02_coffee_script.rb', line 25 def false end |
#compile_coffee(script) ⇒ Object
33 34 35 36 37 38 39 |
# File 'platypus/tmp/set/gem-defaults/mod019-script/abstract/02_coffee_script.rb', line 33 def compile_coffee script ::CoffeeScript.compile script, no_wrap: rescue StandardError => 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 |
#view: core ⇒ Object
29 30 31 |
# File 'platypus/tmp/set/gem-defaults/mod019-script/abstract/02_coffee_script.rb', line 29 view :core do compile_coffee _render_raw end |