ds_hash:Ruby 哈希类扩展

时间:2021-05-31 02:23:40
【文件属性】:
文件名称:ds_hash:Ruby 哈希类扩展
文件大小:8KB
文件格式:ZIP
更新时间:2021-05-31 02:23:40
Ruby DsHash Ruby Hash类扩展。 安装 gem install ds_hash 通过实例学习 哈希。 deep_key? hash = { :a => { :b => 'b' } } hash . deep_key? :a , :b # return true hash . deep_key? :a , :x # return false 哈希。 deep_fetch hash = { :a => { :b => 'hello' } } hash . deep_fetch :a , :b # return 'hello' hash . deep_fetch :a , :x # return nil 哈希。 deep_dup hash = { :a => { :b => 'b' } } dup = hash . deep_dup
【文件预览】:
ds_hash-master
----.travis.yml(54B)
----ds_hash.rb(110B)
----Rakefile(2KB)
----ds_hash.gemspec(1KB)
----README.rdoc(2KB)
----Gemfile(405B)
----Gemfile.lock(1KB)
----spec()
--------ds_hash_spec.rb(2KB)
--------spec_helper.rb(357B)
----.gitignore(30B)
----lib()
--------ds_hash.rb(109B)
--------ds_hash()
----LICENSE.txt(1KB)

网友评论