Sha256: 7e98d52616d45c66e6bb318aab5bd9a9588030000a2ba5921bd2bf88580d35d0

Contents?: true

Size: 270 Bytes

Versions: 15

Compression:

Stored size: 270 Bytes

Contents

module Ruby2JS
  class Converter

    # (xstr
    #   (str 'a'))

    handle :xstr do |*children|
      str = eval capture { parse_all *children }

      if @binding
        puts @binding.eval(str).to_s
      else
        puts eval(str).to_s
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

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