Sha256: 58bf4f9dbd7270436311dab85ffd403cb4b50de9ed07cecb3cecf7ba865d9657
Contents?: true
Size: 552 Bytes
Versions: 28
Compression:
Stored size: 552 Bytes
Contents
module Ruby2JS class Converter # (cvasgn :@@a # (int 1)) handle :cvasgn do |var, expression=nil| multi_assign_declarations if @state == :statement prefix = underscored_private ? '_' : '#$' if @class_name parse @class_name put var.to_s.sub('@@', ".#{prefix}") elsif @prototype put var.to_s.sub('@@', "this.#{prefix}") else put var.to_s.sub('@@', "this.constructor.#{prefix}") end if expression put " = "; parse expression end end end end
Version data entries
28 entries across 28 versions & 1 rubygems