shape:验证Ruby对象的形状(哈希,数组等)

时间:2021-02-16 02:38:02
【文件属性】:
文件名称:shape:验证Ruby对象的形状(哈希,数组等)
文件大小:31KB
文件格式:ZIP
更新时间:2021-02-16 02:38:02
Ruby 成形 验证Ruby对象的“形状”! 目录 语境 到目前为止,此gem的主要目的是充当 gem的依赖项。 宝石可能也有其他潜在用途(例如, have_shape RSpec匹配器可能很有用),但是目前支持active_actions的shaped raison d'être 。 安装 将gem添加到应用程序的Gemfile : gem 'shaped' 然后执行: $ bundle install 如果要在不依赖于带有Gemfile的项目的系统上安装gem,则可以执行 $ gem install shaped 用法 shaped的核心概念是“形状”,我​​们的意思是“一个对象,它描述了一些我们希望能够针对其他对象进行测试的特征”。 这是一个例子: require 'shaped' shape = Shaped :: Shapes :: Hash . new ( { email :
【文件预览】:
shaped-master
----.gitignore(113B)
----README.md(11KB)
----.rubocop.yml(178B)
----CHANGELOG.md(5KB)
----bin()
--------rubocop(824B)
--------console(371B)
--------guard(796B)
--------rspec(838B)
--------_guard-core(808B)
--------release(807B)
--------setup(131B)
----.github()
--------workflows()
----Gemfile(646B)
----.release_assistant.yml(29B)
----.ruby-version(6B)
----.rspec(53B)
----Gemfile.lock(4KB)
----spec()
--------shaped()
--------integration_spec.rb(4KB)
--------shaped_spec.rb(6KB)
--------spec_helper.rb(1KB)
----LICENSE.txt(1KB)
----shaped.gemspec(1KB)
----lib()
--------shaped()
--------shaped.rb(2KB)
----Rakefile(146B)

网友评论