ruby2js:Ruby到JavaScript的转换 源码

cop_59937 14 0 ZIP 2021-02-01 22:02:20

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" } )

用户评论
请输入评论内容
评分:
暂无评论