active_nothing:Ruby gem,用于在Ruby中模拟Smalltalk的条件

时间:2021-05-26 19:21:28
【文件属性】:
文件名称:active_nothing:Ruby gem,用于在Ruby中模拟Smalltalk的条件
文件大小:8KB
文件格式:ZIP
更新时间:2021-05-26 19:21:28
Ruby 主动无 Ruby宝石的灵感和以寻求更好的条件。 安装 将此行添加到您的应用程序的Gemfile中: gem 'active_nothing' 然后执行: $ bundle 或将其自己安装为: $ gem install active_nothing 用法 完成后: require 'active_nothing' 现在,您可以访问逆条件流,例如: [ true , false , nil , Object , 0 , 1 , "" , [ 1 , 2 , 3 ] , { } ] . each do | value | value . if_true { p " #{ value } is truthy" } . if_false { p " #{ value } is falsey" } end # Outputs: "true is trut
【文件预览】:
active_nothing-master
----.gitignore(87B)
----.rspec(53B)
----bin()
--------setup(51B)
--------console(95B)
----.travis.yml(30B)
----active_nothing.gemspec(1KB)
----spec()
--------nil_spec.rb(90B)
--------support()
--------object_spec.rb(1KB)
--------active_nothing_spec.rb(122B)
--------spec_helper.rb(139B)
--------false_spec.rb(94B)
----README.md(2KB)
----lib()
--------active_nothing()
--------active_nothing.rb(125B)
----Gemfile(39B)
----Rakefile(29B)

网友评论