Sha256: f584c91208424b9541415d7181add69622e2d5be65b79c098fd364f67f8ffa2f

Contents?: true

Size: 271 Bytes

Versions: 61

Compression:

Stored size: 271 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

61 entries across 61 versions & 1 rubygems

Version Path
ruby2js-3.5.3 lib/ruby2js/converter/xstr.rb
ruby2js-3.5.2 lib/ruby2js/converter/xstr.rb
ruby2js-3.5.1 lib/ruby2js/converter/xstr.rb
ruby2js-3.5.0 lib/ruby2js/converter/xstr.rb
ruby2js-3.4.0 lib/ruby2js/converter/xstr.rb
ruby2js-3.3.6 lib/ruby2js/converter/xstr.rb
ruby2js-3.3.5 lib/ruby2js/converter/xstr.rb
ruby2js-3.3.4 lib/ruby2js/converter/xstr.rb
ruby2js-3.3.3 lib/ruby2js/converter/xstr.rb
ruby2js-3.3.2 lib/ruby2js/converter/xstr.rb
ruby2js-3.3.1 lib/ruby2js/converter/xstr.rb
ruby2js-3.3.0 lib/ruby2js/converter/xstr.rb
ruby2js-3.2.0 lib/ruby2js/converter/xstr.rb
ruby2js-3.1.2 lib/ruby2js/converter/xstr.rb
ruby2js-3.1.1 lib/ruby2js/converter/xstr.rb
ruby2js-3.1.0 lib/ruby2js/converter/xstr.rb
ruby2js-3.0.15 lib/ruby2js/converter/xstr.rb
ruby2js-3.0.14 lib/ruby2js/converter/xstr.rb
ruby2js-3.0.13 lib/ruby2js/converter/xstr.rb
ruby2js-3.0.12 lib/ruby2js/converter/xstr.rb