文件名称:变异:将您的业务逻辑组合到可清理和验证输入的命令中
文件大小:39KB
文件格式:ZIP
更新时间:2024-03-19 19:05:26
Ruby
变异 将您的业务逻辑组合到用于清理和验证输入的命令中。 为Ruby和Rails应用程序编写安全,可重用和可维护的代码。 安装 gem install mutations 或将其添加到您的Gemfile中: gem 'mutations' 例子 # Define a command that signs up a user. class UserSignup < Mutations :: Command # These inputs are required required do string :email , matches : EMAIL_REGEX string :name end # These inputs are optional optional do boolean :newsletter_subscribe end
【文件预览】:
mutations-master
----.github()
--------workflows()
----MIT-LICENSE(1KB)
----lib()
--------mutations.rb(1KB)
--------mutations()
----Gemfile(37B)
----spec()
--------symbol_filter_spec.rb(1KB)
--------model_filter_spec.rb(3KB)
--------additional_filter_spec.rb(3KB)
--------duck_filter_spec.rb(1KB)
--------integer_filter_spec.rb(3KB)
--------boolean_filter_spec.rb(2KB)
--------mutations_spec.rb(137B)
--------hash_filter_spec.rb(7KB)
--------spec_helper.rb(218B)
--------date_filter_spec.rb(4KB)
--------simple_command.rb(322B)
--------default_spec.rb(823B)
--------errors_spec.rb(3KB)
--------array_filter_spec.rb(8KB)
--------float_filter_spec.rb(3KB)
--------string_filter_spec.rb(8KB)
--------time_filter_spec.rb(4KB)
--------command_spec.rb(9KB)
--------inheritance_spec.rb(1KB)
--------file_filter_spec.rb(3KB)
----Rakefile(175B)
----README.md(9KB)
----mutations.gemspec(608B)
----TODO(538B)
----.gitignore(62B)
----CHANGELOG.md(3KB)