ruby2js:Ruby到JavaScript的转换 源码
Ruby2JS 最小但可扩展的Ruby到JavaScript的转换。 文献资料 访问以获取详细的设置说明和API参考。 概要 基本: require 'ruby2js' puts Ruby2JS . convert ( "a={age:3} \n a.age+=1" ) 带过滤器: require 'ruby2js/filter/functions' puts Ruby2JS . convert ( '"2A".to_i(16)' ) 主机变量替换: puts Ruby2JS . convert ( "@name" , ivars : { :@name => "Joe" } )