Sha256: a1b0d164558685274df409084479a5cc1e83c65d0b606bb91109a70d36e2b53a

Contents?: true

Size: 283 Bytes

Versions: 12

Compression:

Stored size: 283 Bytes

Contents

module Ruby2JS
  class Converter

    # (const nil :C)

    handle :const do |receiver, name|
      # resolve anonymous receivers against rbstack
      receiver ||= @rbstack.map {|rb| rb[name]}.compact.last

      "#{ parse receiver }#{ '.' if receiver }#{ name }"
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ruby2js-1.15.1 lib/ruby2js/converter/const.rb
ruby2js-1.15.0 lib/ruby2js/converter/const.rb
ruby2js-1.14.1 lib/ruby2js/converter/const.rb
ruby2js-1.14.0 lib/ruby2js/converter/const.rb
ruby2js-1.13.1 lib/ruby2js/converter/const.rb
ruby2js-1.13.0 lib/ruby2js/converter/const.rb
ruby2js-1.12.2 lib/ruby2js/converter/const.rb
ruby2js-1.12.1 lib/ruby2js/converter/const.rb
ruby2js-1.12.0 lib/ruby2js/converter/const.rb
ruby2js-1.11.1 lib/ruby2js/converter/const.rb
ruby2js-1.11.0 lib/ruby2js/converter/const.rb
ruby2js-1.10.0 lib/ruby2js/converter/const.rb