erb_with_hash

时间:2024-05-20 18:43:47
【文件属性】:

文件名称:erb_with_hash

文件大小:5KB

文件格式:ZIP

更新时间:2024-05-20 18:43:47

Ruby

ERBWithHash 允许@seki编写的ERB#result中的Hash。 安装 将此行添加到您的应用程序的Gemfile中: gem 'erb_with_hash' 然后执行: $ bundle 或将其自己安装为: $ gem install erb_with_hash 用法 require 'set' class ERB include ERBWithHash end my_erb = ERB . new ( < collection: <% z.each_with_index do |it, idx| %> [<%= idx%>] <%= it %> <% end %> EOS puts my_erb . result_with_hash ( x : File . open ( __FILE__ )


【文件预览】:
erb_with_hash-master
----LICENSE.txt(1KB)
----lib()
--------erb_with_hash()
--------erb_with_hash.rb(980B)
----Gemfile(98B)
----spec()
--------erb_with_hash_spec.rb(288B)
----Rakefile(146B)
----.travis.yml(65B)
----README.md(1024B)
----.gitignore(154B)
----erb_with_hash.gemspec(865B)

网友评论