Sha256: 74310d36ccabbb0c1138d65d776b390940df1c0f320f287bac035211eb992b38
Contents?: true
Size: 825 Bytes
Versions: 33
Compression:
Stored size: 825 Bytes
Contents
module Liquidscript module Generator class Javascript < Base module Exceptions def generate_try(code) out = buffer out << "try {\n" insert_into(code[1], out) out << indent_level << "}" if code[2] out << replace(code[2]) end out end def generate_catch(code) out = buffer out << "catch(#{code[1].value}) {\n" insert_into(code[2], out) out << indent_level << "}" if code[3] out << replace(code[3]) end out end def generate_finally(code) out = buffer out << "finally {\n" insert_into(code[1], out) out << indent_level << "}" end end end end end
Version data entries
33 entries across 33 versions & 1 rubygems