Sha256: 08ea34b855bc633eecf211841596a525c39c3d41bfa85c01faa4d1da6c3d335e

Contents?: true

Size: 301 Bytes

Versions: 23

Compression:

Stored size: 301 Bytes

Contents

module Ruby2JS
  class Converter

    # (cvar :@@a)

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

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
ruby2js-1.15.1 lib/ruby2js/converter/cvar.rb
ruby2js-1.15.0 lib/ruby2js/converter/cvar.rb
ruby2js-1.14.1 lib/ruby2js/converter/cvar.rb
ruby2js-1.14.0 lib/ruby2js/converter/cvar.rb
ruby2js-1.13.1 lib/ruby2js/converter/cvar.rb
ruby2js-1.13.0 lib/ruby2js/converter/cvar.rb
ruby2js-1.12.2 lib/ruby2js/converter/cvar.rb
ruby2js-1.12.1 lib/ruby2js/converter/cvar.rb
ruby2js-1.12.0 lib/ruby2js/converter/cvar.rb
ruby2js-1.11.1 lib/ruby2js/converter/cvar.rb
ruby2js-1.11.0 lib/ruby2js/converter/cvar.rb
ruby2js-1.10.0 lib/ruby2js/converter/cvar.rb
ruby2js-1.9.3 lib/ruby2js/converter/cvar.rb
ruby2js-1.9.2 lib/ruby2js/converter/cvar.rb
ruby2js-1.9.1 lib/ruby2js/converter/cvar.rb
ruby2js-1.9.0 lib/ruby2js/converter/cvar.rb
ruby2js-1.8.0 lib/ruby2js/converter/cvar.rb
ruby2js-1.7.0 lib/ruby2js/converter/cvar.rb
ruby2js-1.6.0 lib/ruby2js/converter/cvar.rb
ruby2js-1.5.0 lib/ruby2js/converter/cvar.rb