Sha256: e602cfb45ef4496724d8b24efb0eb12691b9307775e090d76c51e4d9bd592fff

Contents?: true

Size: 319 Bytes

Versions: 15

Compression:

Stored size: 319 Bytes

Contents

module Ruby2JS
  class Converter

    # (cvar :@@a)

    handle :cvar do |var|
      if @class_name
        parse @class_name
        put var.to_s.sub('@@', "._")
      elsif @prototype
        put var.to_s.sub('@@', 'this._')
      else
        put var.to_s.sub('@@', 'this.constructor._')
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ruby2js-2.0.14 lib/ruby2js/converter/cvar.rb
ruby2js-2.0.13 lib/ruby2js/converter/cvar.rb
ruby2js-2.0.12 lib/ruby2js/converter/cvar.rb
ruby2js-2.0.11 lib/ruby2js/converter/cvar.rb
ruby2js-2.0.10 lib/ruby2js/converter/cvar.rb
ruby2js-2.0.9 lib/ruby2js/converter/cvar.rb
ruby2js-2.0.8 lib/ruby2js/converter/cvar.rb
ruby2js-2.0.7 lib/ruby2js/converter/cvar.rb
ruby2js-2.0.6 lib/ruby2js/converter/cvar.rb
ruby2js-2.0.5 lib/ruby2js/converter/cvar.rb
ruby2js-2.0.4 lib/ruby2js/converter/cvar.rb
ruby2js-2.0.3 lib/ruby2js/converter/cvar.rb
ruby2js-2.0.2 lib/ruby2js/converter/cvar.rb
ruby2js-2.0.1 lib/ruby2js/converter/cvar.rb
ruby2js-2.0.0 lib/ruby2js/converter/cvar.rb