diff --git a/assets/javascripts/site-948a8a19.js.gz b/assets/javascripts/site-948a8a19.js.gz index 0ecf618399..abab85c823 100644 Binary files a/assets/javascripts/site-948a8a19.js.gz and b/assets/javascripts/site-948a8a19.js.gz differ diff --git a/assets/stylesheets/site-9fe218b6.css.gz b/assets/stylesheets/site-9fe218b6.css.gz index d85c653f34..54b055d333 100644 Binary files a/assets/stylesheets/site-9fe218b6.css.gz and b/assets/stylesheets/site-9fe218b6.css.gz differ diff --git a/community/index.html.gz b/community/index.html.gz index e9befc99c7..df69cf4705 100644 Binary files a/community/index.html.gz and b/community/index.html.gz differ diff --git a/conduct/index.html.gz b/conduct/index.html.gz index 1fe8c39578..4cdf6ac3cd 100644 Binary files a/conduct/index.html.gz and b/conduct/index.html.gz differ diff --git a/feed.xml b/feed.xml index f956d8e1de..c79cb489d6 100644 --- a/feed.xml +++ b/feed.xml @@ -13,7 +13,7 @@ http://dry-rb.org/news/2022/10/17/dry-rb-adopts-zeitwerk-for-code-loading/ 2022-10-17T00:00:00+00:00 - 2023-08-27T15:06:02+00:00 + 2023-08-27T15:57:29+00:00 solnic @@ -97,7 +97,7 @@ http://dry-rb.org/news/2021/05/04/introducing-dry-files/ 2021-05-04T00:00:00+00:00 - 2023-08-27T15:06:02+00:00 + 2023-08-27T15:57:29+00:00 jodosha @@ -142,7 +142,7 @@ The other adapter is an <strong>in-memory file system</strong>. It&a http://dry-rb.org/news/2021/04/22/dry-system-0-19-released-with-zeitwerk-support-and-more-leading-the-way-for-hanami-2-0/ 2021-04-22T00:00:00+00:00 - 2023-08-27T15:06:02+00:00 + 2023-08-27T15:57:29+00:00 timriley @@ -208,7 +208,7 @@ The other adapter is an <strong>in-memory file system</strong>. It&a http://dry-rb.org/news/2020/03/11/dry-schema-and-dry-validation-1-5-0-released/ 2020-03-11T00:00:00+00:00 - 2023-08-27T15:06:02+00:00 + 2023-08-27T15:57:29+00:00 solnic @@ -347,7 +347,7 @@ The other adapter is an <strong>in-memory file system</strong>. It&a http://dry-rb.org/news/2019/10/03/introducing-dry-effects/ 2019-10-03T00:00:00+00:00 - 2023-08-27T15:06:02+00:00 + 2023-08-27T15:57:29+00:00 flash-gordon @@ -501,7 +501,7 @@ The other adapter is an <strong>in-memory file system</strong>. It&a http://dry-rb.org/news/2019/06/10/dry-validation-1-0-0-released/ 2019-06-10T00:00:00+00:00 - 2023-08-27T15:06:02+00:00 + 2023-08-27T15:57:29+00:00 solnic diff --git a/fonts/ss-social-circle-0b7192b6.svg.gz b/fonts/ss-social-circle-0b7192b6.svg.gz index b15f7c33d0..af44d12953 100644 Binary files a/fonts/ss-social-circle-0b7192b6.svg.gz and b/fonts/ss-social-circle-0b7192b6.svg.gz differ diff --git a/fonts/ss-social-regular-5a3fe182.svg.gz b/fonts/ss-social-regular-5a3fe182.svg.gz index 25e634480e..aa8a25ba85 100644 Binary files a/fonts/ss-social-regular-5a3fe182.svg.gz and b/fonts/ss-social-regular-5a3fe182.svg.gz differ diff --git a/gems-index/index.html.gz b/gems-index/index.html.gz index f707a1be10..384f854b02 100644 Binary files a/gems-index/index.html.gz and b/gems-index/index.html.gz differ diff --git a/gems/dry-auto_inject/0.6/basic-usage/index.html b/gems/dry-auto_inject/0.6/basic-usage/index.html index b59ae3b4dc..96691cbab8 100644 --- a/gems/dry-auto_inject/0.6/basic-usage/index.html +++ b/gems/dry-auto_inject/0.6/basic-usage/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Basic usage

Requirements

diff --git a/gems/dry-auto_inject/0.6/basic-usage/index.html.gz b/gems/dry-auto_inject/0.6/basic-usage/index.html.gz index 78528dd125..ee8f69f0b5 100644 Binary files a/gems/dry-auto_inject/0.6/basic-usage/index.html.gz and b/gems/dry-auto_inject/0.6/basic-usage/index.html.gz differ diff --git a/gems/dry-auto_inject/0.6/how-does-it-work/index.html b/gems/dry-auto_inject/0.6/how-does-it-work/index.html index a21277c5df..e83e545994 100644 --- a/gems/dry-auto_inject/0.6/how-does-it-work/index.html +++ b/gems/dry-auto_inject/0.6/how-does-it-work/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

How does it work?

dry-auto_inject enables constructor dependency injection for your objects. It achieves this by defining two methods in the module that you include in your class.

+});

How does it work?

dry-auto_inject enables constructor dependency injection for your objects. It achieves this by defining two methods in the module that you include in your class.

First, it defines .new, which resolves your dependencies from the container, if you haven't otherwise provided them as explicit arguments. It then passes these dependencies as arguments onto #initialize, as per Ruby’s usual behaviour.

diff --git a/gems/dry-auto_inject/0.6/how-does-it-work/index.html.gz b/gems/dry-auto_inject/0.6/how-does-it-work/index.html.gz index a5c4db9a49..2c3f5dc11a 100644 Binary files a/gems/dry-auto_inject/0.6/how-does-it-work/index.html.gz and b/gems/dry-auto_inject/0.6/how-does-it-work/index.html.gz differ diff --git a/gems/dry-auto_inject/0.6/index.html b/gems/dry-auto_inject/0.6/index.html index 236b67aff9..2cc1126519 100644 --- a/gems/dry-auto_inject/0.6/index.html +++ b/gems/dry-auto_inject/0.6/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-auto_inject provides low-impact dependency injection and resolution support for your classes.

+});

Injection strategies

dry-auto_inject supports three injection strategies, allowing you to design and integrate with different kinds of classes.

+});

Basic usage

Requirements

diff --git a/gems/dry-auto_inject/0.7/basic-usage/index.html.gz b/gems/dry-auto_inject/0.7/basic-usage/index.html.gz index 6e0668acc5..e3d3f89007 100644 Binary files a/gems/dry-auto_inject/0.7/basic-usage/index.html.gz and b/gems/dry-auto_inject/0.7/basic-usage/index.html.gz differ diff --git a/gems/dry-auto_inject/0.7/how-does-it-work/index.html b/gems/dry-auto_inject/0.7/how-does-it-work/index.html index 5845136aec..60d66d5eb3 100644 --- a/gems/dry-auto_inject/0.7/how-does-it-work/index.html +++ b/gems/dry-auto_inject/0.7/how-does-it-work/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

How does it work?

dry-auto_inject enables constructor dependency injection for your objects. It achieves this by defining two methods in the module that you include in your class.

+});

How does it work?

dry-auto_inject enables constructor dependency injection for your objects. It achieves this by defining two methods in the module that you include in your class.

First, it defines .new, which resolves your dependencies from the container, if you haven't otherwise provided them as explicit arguments. It then passes these dependencies as arguments onto #initialize, as per Ruby’s usual behaviour.

diff --git a/gems/dry-auto_inject/0.7/how-does-it-work/index.html.gz b/gems/dry-auto_inject/0.7/how-does-it-work/index.html.gz index 92e7b7b825..a8847c87df 100644 Binary files a/gems/dry-auto_inject/0.7/how-does-it-work/index.html.gz and b/gems/dry-auto_inject/0.7/how-does-it-work/index.html.gz differ diff --git a/gems/dry-auto_inject/0.7/index.html b/gems/dry-auto_inject/0.7/index.html index 62b684dc2e..334a84084f 100644 --- a/gems/dry-auto_inject/0.7/index.html +++ b/gems/dry-auto_inject/0.7/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-auto_inject provides low-impact dependency injection and resolution support for your classes.

+});

Injection strategies

dry-auto_inject supports three injection strategies, allowing you to design and integrate with different kinds of classes.

+});

Basic usage

Requirements

diff --git a/gems/dry-auto_inject/0.8/basic-usage/index.html.gz b/gems/dry-auto_inject/0.8/basic-usage/index.html.gz index fa98d30e1f..1404c7f86a 100644 Binary files a/gems/dry-auto_inject/0.8/basic-usage/index.html.gz and b/gems/dry-auto_inject/0.8/basic-usage/index.html.gz differ diff --git a/gems/dry-auto_inject/0.8/how-does-it-work/index.html b/gems/dry-auto_inject/0.8/how-does-it-work/index.html index 3f62ccf837..13cc6a07b8 100644 --- a/gems/dry-auto_inject/0.8/how-does-it-work/index.html +++ b/gems/dry-auto_inject/0.8/how-does-it-work/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

How does it work?

dry-auto_inject enables constructor dependency injection for your objects. It achieves this by defining two methods in the module that you include in your class.

+});

How does it work?

dry-auto_inject enables constructor dependency injection for your objects. It achieves this by defining two methods in the module that you include in your class.

First, it defines .new, which resolves your dependencies from the container, if you haven't otherwise provided them as explicit arguments. It then passes these dependencies as arguments onto #initialize, as per Ruby’s usual behaviour.

diff --git a/gems/dry-auto_inject/0.8/how-does-it-work/index.html.gz b/gems/dry-auto_inject/0.8/how-does-it-work/index.html.gz index 33fa47f0c5..8ad4d7277c 100644 Binary files a/gems/dry-auto_inject/0.8/how-does-it-work/index.html.gz and b/gems/dry-auto_inject/0.8/how-does-it-work/index.html.gz differ diff --git a/gems/dry-auto_inject/0.8/index.html b/gems/dry-auto_inject/0.8/index.html index 4059ffc02b..a5b7829857 100644 --- a/gems/dry-auto_inject/0.8/index.html +++ b/gems/dry-auto_inject/0.8/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-auto_inject provides low-impact dependency injection and resolution support for your classes.

+});

Injection strategies

dry-auto_inject supports three injection strategies, allowing you to design and integrate with different kinds of classes.

+});

Basic usage

Requirements

diff --git a/gems/dry-auto_inject/0.9/basic-usage/index.html.gz b/gems/dry-auto_inject/0.9/basic-usage/index.html.gz index 516e4e1f9c..bdb729ea97 100644 Binary files a/gems/dry-auto_inject/0.9/basic-usage/index.html.gz and b/gems/dry-auto_inject/0.9/basic-usage/index.html.gz differ diff --git a/gems/dry-auto_inject/0.9/how-does-it-work/index.html b/gems/dry-auto_inject/0.9/how-does-it-work/index.html index 16eccaeaf3..7b4ba45cb2 100644 --- a/gems/dry-auto_inject/0.9/how-does-it-work/index.html +++ b/gems/dry-auto_inject/0.9/how-does-it-work/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

How does it work?

dry-auto_inject enables constructor dependency injection for your objects. It achieves this by defining two methods in the module that you include in your class.

+});

How does it work?

dry-auto_inject enables constructor dependency injection for your objects. It achieves this by defining two methods in the module that you include in your class.

First, it defines .new, which resolves your dependencies from the container, if you haven't otherwise provided them as explicit arguments. It then passes these dependencies as arguments onto #initialize, as per Ruby’s usual behaviour.

diff --git a/gems/dry-auto_inject/0.9/how-does-it-work/index.html.gz b/gems/dry-auto_inject/0.9/how-does-it-work/index.html.gz index c3ae6cb1d1..dacb53ecab 100644 Binary files a/gems/dry-auto_inject/0.9/how-does-it-work/index.html.gz and b/gems/dry-auto_inject/0.9/how-does-it-work/index.html.gz differ diff --git a/gems/dry-auto_inject/0.9/index.html b/gems/dry-auto_inject/0.9/index.html index cbe66b0817..6ce2d3b8ef 100644 --- a/gems/dry-auto_inject/0.9/index.html +++ b/gems/dry-auto_inject/0.9/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-auto_inject provides low-impact dependency injection and resolution support for your classes.

+});

Injection strategies

dry-auto_inject supports three injection strategies, allowing you to design and integrate with different kinds of classes.

+});

Basic usage

Requirements

diff --git a/gems/dry-auto_inject/1.0/basic-usage/index.html.gz b/gems/dry-auto_inject/1.0/basic-usage/index.html.gz index 5d2365732a..5480bc3c0f 100644 Binary files a/gems/dry-auto_inject/1.0/basic-usage/index.html.gz and b/gems/dry-auto_inject/1.0/basic-usage/index.html.gz differ diff --git a/gems/dry-auto_inject/1.0/how-does-it-work/index.html b/gems/dry-auto_inject/1.0/how-does-it-work/index.html index 09825bcb41..0144d7c2d1 100644 --- a/gems/dry-auto_inject/1.0/how-does-it-work/index.html +++ b/gems/dry-auto_inject/1.0/how-does-it-work/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

How does it work?

dry-auto_inject enables constructor dependency injection for your objects. It achieves this by defining two methods in the module that you include in your class.

+});

How does it work?

dry-auto_inject enables constructor dependency injection for your objects. It achieves this by defining two methods in the module that you include in your class.

First, it defines .new, which resolves your dependencies from the container, if you haven't otherwise provided them as explicit arguments. It then passes these dependencies as arguments onto #initialize, as per Ruby’s usual behaviour.

diff --git a/gems/dry-auto_inject/1.0/how-does-it-work/index.html.gz b/gems/dry-auto_inject/1.0/how-does-it-work/index.html.gz index 334d872c51..6ea8d4c4c2 100644 Binary files a/gems/dry-auto_inject/1.0/how-does-it-work/index.html.gz and b/gems/dry-auto_inject/1.0/how-does-it-work/index.html.gz differ diff --git a/gems/dry-auto_inject/1.0/index.html b/gems/dry-auto_inject/1.0/index.html index 6679e6f7b9..f605284aa4 100644 --- a/gems/dry-auto_inject/1.0/index.html +++ b/gems/dry-auto_inject/1.0/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-auto_inject provides low-impact dependency injection and resolution support for your classes.

+});

Injection strategies

dry-auto_inject supports three injection strategies, allowing you to design and integrate with different kinds of classes.

+});

dry-auto_inject main

dry-auto_inject main

Basic usage

Requirements

diff --git a/gems/dry-auto_inject/main/basic-usage/index.html.gz b/gems/dry-auto_inject/main/basic-usage/index.html.gz index 47c9133fcb..3e7de7bfb5 100644 Binary files a/gems/dry-auto_inject/main/basic-usage/index.html.gz and b/gems/dry-auto_inject/main/basic-usage/index.html.gz differ diff --git a/gems/dry-auto_inject/main/how-does-it-work/index.html b/gems/dry-auto_inject/main/how-does-it-work/index.html index 0d4cc36e49..f24fde1a28 100644 --- a/gems/dry-auto_inject/main/how-does-it-work/index.html +++ b/gems/dry-auto_inject/main/how-does-it-work/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-auto_inject main

How does it work?

dry-auto_inject enables constructor dependency injection for your objects. It achieves this by defining two methods in the module that you include in your class.

+});

dry-auto_inject main

How does it work?

dry-auto_inject enables constructor dependency injection for your objects. It achieves this by defining two methods in the module that you include in your class.

First, it defines .new, which resolves your dependencies from the container, if you haven't otherwise provided them as explicit arguments. It then passes these dependencies as arguments onto #initialize, as per Ruby’s usual behaviour.

diff --git a/gems/dry-auto_inject/main/how-does-it-work/index.html.gz b/gems/dry-auto_inject/main/how-does-it-work/index.html.gz index 2bf6160a8b..b1a6ba0264 100644 Binary files a/gems/dry-auto_inject/main/how-does-it-work/index.html.gz and b/gems/dry-auto_inject/main/how-does-it-work/index.html.gz differ diff --git a/gems/dry-auto_inject/main/index.html b/gems/dry-auto_inject/main/index.html index 274c5ea4a6..63a66bc9fc 100644 --- a/gems/dry-auto_inject/main/index.html +++ b/gems/dry-auto_inject/main/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-auto_inject main

Introduction

dry-auto_inject provides low-impact dependency injection and resolution support for your classes.

+});

dry-auto_inject main

dry-auto_inject main

Injection strategies

dry-auto_inject supports three injection strategies, allowing you to design and integrate with different kinds of classes.

+});

dry-auto_inject main

Arguments

An argument is a token passed after the command name. +});

Arguments

An argument is a token passed after the command name. For instance, given the foo greet command, when an user types foo greet Luca, then Luca is considered an argument. A command can accept none or many arguments. An argument can be declared as required.

diff --git a/gems/dry-cli/0.4/arguments/index.html.gz b/gems/dry-cli/0.4/arguments/index.html.gz index f2bb05bcbe..c48b2968b4 100644 Binary files a/gems/dry-cli/0.4/arguments/index.html.gz and b/gems/dry-cli/0.4/arguments/index.html.gz differ diff --git a/gems/dry-cli/0.4/callbacks/index.html b/gems/dry-cli/0.4/callbacks/index.html index 982daada07..6f04f82078 100644 --- a/gems/dry-cli/0.4/callbacks/index.html +++ b/gems/dry-cli/0.4/callbacks/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Callbacks

Third party gems can register before and after callbacks to enhance a command.

+});

Commands

A command is a subclass of Dry::CLI::Command and it must respond to #call(*).

+});

Commands

A command is a subclass of Dry::CLI::Command and it must respond to #call(*).

For a given command name, you can register a corresponding command.

diff --git a/gems/dry-cli/0.4/commands/index.html.gz b/gems/dry-cli/0.4/commands/index.html.gz index 59a12518c9..e058e7ad40 100644 Binary files a/gems/dry-cli/0.4/commands/index.html.gz and b/gems/dry-cli/0.4/commands/index.html.gz differ diff --git a/gems/dry-cli/0.4/file-utilities/index.html b/gems/dry-cli/0.4/file-utilities/index.html index d030b7e5e2..38a7e785b6 100644 --- a/gems/dry-cli/0.4/file-utilities/index.html +++ b/gems/dry-cli/0.4/file-utilities/index.html @@ -3,6 +3,6 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

File Utilities

File utilities are a set of useful methods to manipulate files and directories, which must be required manually. API doc

+});

File Utilities

File utilities are a set of useful methods to manipulate files and directories, which must be required manually. API doc

require 'dry/cli/utils/files'
 

octocatEdit on GitHub

\ No newline at end of file diff --git a/gems/dry-cli/0.4/file-utilities/index.html.gz b/gems/dry-cli/0.4/file-utilities/index.html.gz index 272c5d4415..ce6d690466 100644 Binary files a/gems/dry-cli/0.4/file-utilities/index.html.gz and b/gems/dry-cli/0.4/file-utilities/index.html.gz differ diff --git a/gems/dry-cli/0.4/index.html b/gems/dry-cli/0.4/index.html index af288bd31f..10928f306e 100644 --- a/gems/dry-cli/0.4/index.html +++ b/gems/dry-cli/0.4/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-cli is a general-purpose framework for developing Command Line Interface (CLI) applications. It represents commands as objects that can be registered and offers support for arguments, options and forwarding variadic arguments to a sub-command.

+});

Options

An option is a named argument that is passed after the command name and the arguments.

+});

Options

An option is a named argument that is passed after the command name and the arguments.

For instance, given the foo request command, when an user types foo request --mode=http2, then --mode=http2 is considered an option. A command can accept none or many options.

diff --git a/gems/dry-cli/0.4/options/index.html.gz b/gems/dry-cli/0.4/options/index.html.gz index 9283675018..cdb09d3618 100644 Binary files a/gems/dry-cli/0.4/options/index.html.gz and b/gems/dry-cli/0.4/options/index.html.gz differ diff --git a/gems/dry-cli/0.4/subcommands/index.html b/gems/dry-cli/0.4/subcommands/index.html index 7ca5f9a41d..8d77177186 100644 --- a/gems/dry-cli/0.4/subcommands/index.html +++ b/gems/dry-cli/0.4/subcommands/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Subcommands

There is nothing special about subcommands, they are simply command objects registered under a nested command name:

+});

Subcommands

There is nothing special about subcommands, they are simply command objects registered under a nested command name:

#!/usr/bin/env ruby
 require "bundler/setup"
 require "dry/cli"
diff --git a/gems/dry-cli/0.4/subcommands/index.html.gz b/gems/dry-cli/0.4/subcommands/index.html.gz
index 9282547bfd..17272825c0 100644
Binary files a/gems/dry-cli/0.4/subcommands/index.html.gz and b/gems/dry-cli/0.4/subcommands/index.html.gz differ
diff --git a/gems/dry-cli/0.4/variadic-arguments/index.html b/gems/dry-cli/0.4/variadic-arguments/index.html
index 71c60f2f66..dee38d1f62 100644
--- a/gems/dry-cli/0.4/variadic-arguments/index.html
+++ b/gems/dry-cli/0.4/variadic-arguments/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Variadic arguments

Sometimes we need extra arguments because those will be forwarded to a sub-command like ssh, docker or cat.

+});

Variadic arguments

Sometimes we need extra arguments because those will be forwarded to a sub-command like ssh, docker or cat.

By using -- (double dash, aka hypen), the user indicates the end of the arguments and options belonging to the main command, and the beginning of the variadic arguments that can be forwarded to the sub-command. These extra arguments are included as :args in the keyword arguments available for each command.

diff --git a/gems/dry-cli/0.4/variadic-arguments/index.html.gz b/gems/dry-cli/0.4/variadic-arguments/index.html.gz index c2475de1cf..e22b7a3545 100644 Binary files a/gems/dry-cli/0.4/variadic-arguments/index.html.gz and b/gems/dry-cli/0.4/variadic-arguments/index.html.gz differ diff --git a/gems/dry-cli/0.5/arguments/index.html b/gems/dry-cli/0.5/arguments/index.html index e686524749..4be0a541ed 100644 --- a/gems/dry-cli/0.5/arguments/index.html +++ b/gems/dry-cli/0.5/arguments/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Arguments

An argument is a token passed after the command name. +});

Arguments

An argument is a token passed after the command name. For instance, given the foo greet command, when an user types foo greet Luca, then Luca is considered an argument. A command can accept none or many arguments. An argument can be declared as required.

diff --git a/gems/dry-cli/0.5/arguments/index.html.gz b/gems/dry-cli/0.5/arguments/index.html.gz index 1ce8c3141d..12c36d52c9 100644 Binary files a/gems/dry-cli/0.5/arguments/index.html.gz and b/gems/dry-cli/0.5/arguments/index.html.gz differ diff --git a/gems/dry-cli/0.5/callbacks/index.html b/gems/dry-cli/0.5/callbacks/index.html index b471d35dc1..3755b1570b 100644 --- a/gems/dry-cli/0.5/callbacks/index.html +++ b/gems/dry-cli/0.5/callbacks/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Callbacks

Third party gems can register before and after callbacks to enhance a command.

+});

Commands

A command is a subclass of Dry::CLI::Command and it must respond to #call(*).

+});

Commands

A command is a subclass of Dry::CLI::Command and it must respond to #call(*).

For a given command name, you can register a corresponding command.

diff --git a/gems/dry-cli/0.5/commands/index.html.gz b/gems/dry-cli/0.5/commands/index.html.gz index 1b4c6c15de..8de5d93c0a 100644 Binary files a/gems/dry-cli/0.5/commands/index.html.gz and b/gems/dry-cli/0.5/commands/index.html.gz differ diff --git a/gems/dry-cli/0.5/file-utilities/index.html b/gems/dry-cli/0.5/file-utilities/index.html index f5837306b3..6d2e4772ae 100644 --- a/gems/dry-cli/0.5/file-utilities/index.html +++ b/gems/dry-cli/0.5/file-utilities/index.html @@ -3,6 +3,6 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

File Utilities

File utilities are a set of useful methods to manipulate files and directories, which must be required manually. API doc

+});

File Utilities

File utilities are a set of useful methods to manipulate files and directories, which must be required manually. API doc

require 'dry/cli/utils/files'
 

octocatEdit on GitHub

\ No newline at end of file diff --git a/gems/dry-cli/0.5/file-utilities/index.html.gz b/gems/dry-cli/0.5/file-utilities/index.html.gz index 9af3607bad..861099fb87 100644 Binary files a/gems/dry-cli/0.5/file-utilities/index.html.gz and b/gems/dry-cli/0.5/file-utilities/index.html.gz differ diff --git a/gems/dry-cli/0.5/index.html b/gems/dry-cli/0.5/index.html index fd16fc362d..f2337fc408 100644 --- a/gems/dry-cli/0.5/index.html +++ b/gems/dry-cli/0.5/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-cli is a general-purpose framework for developing Command Line Interface (CLI) applications. It represents commands as objects that can be registered and offers support for arguments, options and forwarding variadic arguments to a sub-command.

+});

Options

An option is a named argument that is passed after the command name and the arguments.

+});

Options

An option is a named argument that is passed after the command name and the arguments.

For instance, given the foo request command, when an user types foo request --mode=http2, then --mode=http2 is considered an option. A command can accept none or many options.

diff --git a/gems/dry-cli/0.5/options/index.html.gz b/gems/dry-cli/0.5/options/index.html.gz index 3f3e4aae81..a08183f251 100644 Binary files a/gems/dry-cli/0.5/options/index.html.gz and b/gems/dry-cli/0.5/options/index.html.gz differ diff --git a/gems/dry-cli/0.5/subcommands/index.html b/gems/dry-cli/0.5/subcommands/index.html index d8e71877b3..4cd243b411 100644 --- a/gems/dry-cli/0.5/subcommands/index.html +++ b/gems/dry-cli/0.5/subcommands/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Subcommands

There is nothing special about subcommands, they are simply command objects registered under a nested command name:

+});

Subcommands

There is nothing special about subcommands, they are simply command objects registered under a nested command name:

#!/usr/bin/env ruby
 require "bundler/setup"
 require "dry/cli"
diff --git a/gems/dry-cli/0.5/subcommands/index.html.gz b/gems/dry-cli/0.5/subcommands/index.html.gz
index 76ddbf139e..460c462c3b 100644
Binary files a/gems/dry-cli/0.5/subcommands/index.html.gz and b/gems/dry-cli/0.5/subcommands/index.html.gz differ
diff --git a/gems/dry-cli/0.5/variadic-arguments/index.html b/gems/dry-cli/0.5/variadic-arguments/index.html
index 699ebce093..1451b1010a 100644
--- a/gems/dry-cli/0.5/variadic-arguments/index.html
+++ b/gems/dry-cli/0.5/variadic-arguments/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Variadic arguments

Sometimes we need extra arguments because those will be forwarded to a sub-command like ssh, docker or cat.

+});

Variadic arguments

Sometimes we need extra arguments because those will be forwarded to a sub-command like ssh, docker or cat.

By using -- (double dash, aka hypen), the user indicates the end of the arguments and options belonging to the main command, and the beginning of the variadic arguments that can be forwarded to the sub-command. These extra arguments are included as :args in the keyword arguments available for each command.

diff --git a/gems/dry-cli/0.5/variadic-arguments/index.html.gz b/gems/dry-cli/0.5/variadic-arguments/index.html.gz index bcc42ebead..3aee9ebf2b 100644 Binary files a/gems/dry-cli/0.5/variadic-arguments/index.html.gz and b/gems/dry-cli/0.5/variadic-arguments/index.html.gz differ diff --git a/gems/dry-cli/0.6/arguments/index.html b/gems/dry-cli/0.6/arguments/index.html index 0b5ee91cae..115742cd8a 100644 --- a/gems/dry-cli/0.6/arguments/index.html +++ b/gems/dry-cli/0.6/arguments/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Arguments

An argument is a token passed after the command name. +});

Arguments

An argument is a token passed after the command name. For instance, given the foo greet command, when an user types foo greet Luca, then Luca is considered an argument. A command can accept none or many arguments. An argument can be declared as required.

diff --git a/gems/dry-cli/0.6/arguments/index.html.gz b/gems/dry-cli/0.6/arguments/index.html.gz index 14e6c7e93c..50edd141de 100644 Binary files a/gems/dry-cli/0.6/arguments/index.html.gz and b/gems/dry-cli/0.6/arguments/index.html.gz differ diff --git a/gems/dry-cli/0.6/callbacks/index.html b/gems/dry-cli/0.6/callbacks/index.html index 6c618d0965..fc1ebe8539 100644 --- a/gems/dry-cli/0.6/callbacks/index.html +++ b/gems/dry-cli/0.6/callbacks/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Callbacks

Third party gems can register before and after callbacks to enhance a command.

+});

Commands

A command is a subclass of Dry::CLI::Command and it must respond to #call(*).

+});

Commands

A command is a subclass of Dry::CLI::Command and it must respond to #call(*).

For a given command name, you can register a corresponding command.

diff --git a/gems/dry-cli/0.6/commands/index.html.gz b/gems/dry-cli/0.6/commands/index.html.gz index 4b0b3f9212..ad5131ba52 100644 Binary files a/gems/dry-cli/0.6/commands/index.html.gz and b/gems/dry-cli/0.6/commands/index.html.gz differ diff --git a/gems/dry-cli/0.6/file-utilities/index.html b/gems/dry-cli/0.6/file-utilities/index.html index 004f860b48..56927618f3 100644 --- a/gems/dry-cli/0.6/file-utilities/index.html +++ b/gems/dry-cli/0.6/file-utilities/index.html @@ -3,6 +3,6 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

File Utilities

File utilities are a set of useful methods to manipulate files and directories, which must be required manually. API doc

+});

File Utilities

File utilities are a set of useful methods to manipulate files and directories, which must be required manually. API doc

require 'dry/cli/utils/files'
 

octocatEdit on GitHub

\ No newline at end of file diff --git a/gems/dry-cli/0.6/file-utilities/index.html.gz b/gems/dry-cli/0.6/file-utilities/index.html.gz index 0505882489..1602cf80ca 100644 Binary files a/gems/dry-cli/0.6/file-utilities/index.html.gz and b/gems/dry-cli/0.6/file-utilities/index.html.gz differ diff --git a/gems/dry-cli/0.6/index.html b/gems/dry-cli/0.6/index.html index 66a04d2d2c..a355430cf5 100644 --- a/gems/dry-cli/0.6/index.html +++ b/gems/dry-cli/0.6/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-cli is a general-purpose framework for developing Command Line Interface (CLI) applications. It represents commands as objects that can be registered and offers support for arguments, options and forwarding variadic arguments to a sub-command.

+});

Options

An option is a named argument that is passed after the command name and the arguments.

+});

Options

An option is a named argument that is passed after the command name and the arguments.

For instance, given the foo request command, when an user types foo request --mode=http2, then --mode=http2 is considered an option. A command can accept none or many options.

diff --git a/gems/dry-cli/0.6/options/index.html.gz b/gems/dry-cli/0.6/options/index.html.gz index 494c8a7f73..f71f7050c7 100644 Binary files a/gems/dry-cli/0.6/options/index.html.gz and b/gems/dry-cli/0.6/options/index.html.gz differ diff --git a/gems/dry-cli/0.6/subcommands/index.html b/gems/dry-cli/0.6/subcommands/index.html index 60291330cf..71f2965b42 100644 --- a/gems/dry-cli/0.6/subcommands/index.html +++ b/gems/dry-cli/0.6/subcommands/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Subcommands

There is nothing special about subcommands, they are simply command objects registered under a nested command name:

+});

Subcommands

There is nothing special about subcommands, they are simply command objects registered under a nested command name:

#!/usr/bin/env ruby
 require "bundler/setup"
 require "dry/cli"
diff --git a/gems/dry-cli/0.6/subcommands/index.html.gz b/gems/dry-cli/0.6/subcommands/index.html.gz
index e7483a07bd..2b277765c6 100644
Binary files a/gems/dry-cli/0.6/subcommands/index.html.gz and b/gems/dry-cli/0.6/subcommands/index.html.gz differ
diff --git a/gems/dry-cli/0.6/variadic-arguments/index.html b/gems/dry-cli/0.6/variadic-arguments/index.html
index 187c97ec2d..d7dd6502f4 100644
--- a/gems/dry-cli/0.6/variadic-arguments/index.html
+++ b/gems/dry-cli/0.6/variadic-arguments/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Variadic arguments

Sometimes we need extra arguments because those will be forwarded to a sub-command like ssh, docker or cat.

+});

Variadic arguments

Sometimes we need extra arguments because those will be forwarded to a sub-command like ssh, docker or cat.

By using -- (double dash, aka hypen), the user indicates the end of the arguments and options belonging to the main command, and the beginning of the variadic arguments that can be forwarded to the sub-command. These extra arguments are included as :args in the keyword arguments available for each command.

diff --git a/gems/dry-cli/0.6/variadic-arguments/index.html.gz b/gems/dry-cli/0.6/variadic-arguments/index.html.gz index 0770bdae74..f137ba6cff 100644 Binary files a/gems/dry-cli/0.6/variadic-arguments/index.html.gz and b/gems/dry-cli/0.6/variadic-arguments/index.html.gz differ diff --git a/gems/dry-cli/0.7/arguments/index.html b/gems/dry-cli/0.7/arguments/index.html index 7cdb4a3493..e48a93c7c7 100644 --- a/gems/dry-cli/0.7/arguments/index.html +++ b/gems/dry-cli/0.7/arguments/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Arguments

An argument is a token passed after the command name. +});

Arguments

An argument is a token passed after the command name. For instance, given the foo greet command, when an user types foo greet Luca, then Luca is considered an argument. A command can accept none or many arguments. An argument can be declared as required.

diff --git a/gems/dry-cli/0.7/arguments/index.html.gz b/gems/dry-cli/0.7/arguments/index.html.gz index c526eda0dc..c1c643dffc 100644 Binary files a/gems/dry-cli/0.7/arguments/index.html.gz and b/gems/dry-cli/0.7/arguments/index.html.gz differ diff --git a/gems/dry-cli/0.7/callbacks/index.html b/gems/dry-cli/0.7/callbacks/index.html index adb9b8e853..0f1ee49ae1 100644 --- a/gems/dry-cli/0.7/callbacks/index.html +++ b/gems/dry-cli/0.7/callbacks/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Callbacks

Third party gems can register before and after callbacks to enhance a command.

+});

Commands with subcommands and params

There is a way to register command with arguments, options and subcommands.

+});

Commands with subcommands and params

There is a way to register command with arguments, options and subcommands.

This helps to implement complex nested logic.

diff --git a/gems/dry-cli/0.7/commands/index.html b/gems/dry-cli/0.7/commands/index.html index bda8758a9a..86e75bb764 100644 --- a/gems/dry-cli/0.7/commands/index.html +++ b/gems/dry-cli/0.7/commands/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Commands

A command is a subclass of Dry::CLI::Command and it must respond to #call(*).

+});

Commands

A command is a subclass of Dry::CLI::Command and it must respond to #call(*).

For a given command name, you can register a corresponding command.

diff --git a/gems/dry-cli/0.7/commands/index.html.gz b/gems/dry-cli/0.7/commands/index.html.gz index bf89944a67..ef46342027 100644 Binary files a/gems/dry-cli/0.7/commands/index.html.gz and b/gems/dry-cli/0.7/commands/index.html.gz differ diff --git a/gems/dry-cli/0.7/index.html b/gems/dry-cli/0.7/index.html index 6f0a339474..6c8e0d2a2c 100644 --- a/gems/dry-cli/0.7/index.html +++ b/gems/dry-cli/0.7/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-cli is a general-purpose framework for developing Command Line Interface (CLI) applications. It represents commands as objects that can be registered and offers support for arguments, options and forwarding variadic arguments to a sub-command.

+});

Options

An option is a named argument that is passed after the command name and the arguments.

+});

Options

An option is a named argument that is passed after the command name and the arguments.

For instance, given the foo request command, when an user types foo request --mode=http2, then --mode=http2 is considered an option. A command can accept none or many options.

diff --git a/gems/dry-cli/0.7/options/index.html.gz b/gems/dry-cli/0.7/options/index.html.gz index 5ad0f4ccc2..89125d3ff9 100644 Binary files a/gems/dry-cli/0.7/options/index.html.gz and b/gems/dry-cli/0.7/options/index.html.gz differ diff --git a/gems/dry-cli/0.7/subcommands/index.html b/gems/dry-cli/0.7/subcommands/index.html index f79a377b38..c1df0195bc 100644 --- a/gems/dry-cli/0.7/subcommands/index.html +++ b/gems/dry-cli/0.7/subcommands/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Subcommands

There is nothing special about subcommands, they are simply command objects registered under a nested command name:

+});

Subcommands

There is nothing special about subcommands, they are simply command objects registered under a nested command name:

#!/usr/bin/env ruby
 require "bundler/setup"
 require "dry/cli"
diff --git a/gems/dry-cli/0.7/subcommands/index.html.gz b/gems/dry-cli/0.7/subcommands/index.html.gz
index 8e91224225..9519165e97 100644
Binary files a/gems/dry-cli/0.7/subcommands/index.html.gz and b/gems/dry-cli/0.7/subcommands/index.html.gz differ
diff --git a/gems/dry-cli/0.7/variadic-arguments/index.html b/gems/dry-cli/0.7/variadic-arguments/index.html
index 137ac24fc6..6c341a6dd9 100644
--- a/gems/dry-cli/0.7/variadic-arguments/index.html
+++ b/gems/dry-cli/0.7/variadic-arguments/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Variadic arguments

Sometimes we need extra arguments because those will be forwarded to a sub-command like ssh, docker or cat.

+});

Variadic arguments

Sometimes we need extra arguments because those will be forwarded to a sub-command like ssh, docker or cat.

By using -- (double dash, aka hypen), the user indicates the end of the arguments and options belonging to the main command, and the beginning of the variadic arguments that can be forwarded to the sub-command. These extra arguments are included as :args in the keyword arguments available for each command.

diff --git a/gems/dry-cli/0.7/variadic-arguments/index.html.gz b/gems/dry-cli/0.7/variadic-arguments/index.html.gz index 2b6476666c..8a848875d6 100644 Binary files a/gems/dry-cli/0.7/variadic-arguments/index.html.gz and b/gems/dry-cli/0.7/variadic-arguments/index.html.gz differ diff --git a/gems/dry-cli/1.0/arguments/index.html b/gems/dry-cli/1.0/arguments/index.html index 1c8165af4c..7a579f4b26 100644 --- a/gems/dry-cli/1.0/arguments/index.html +++ b/gems/dry-cli/1.0/arguments/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Arguments

An argument is a token passed after the command name. +});

Arguments

An argument is a token passed after the command name. For instance, given the foo greet command, when an user types foo greet Luca, then Luca is considered an argument. A command can accept none or many arguments. An argument can be declared as required.

diff --git a/gems/dry-cli/1.0/arguments/index.html.gz b/gems/dry-cli/1.0/arguments/index.html.gz index 34ae2aced7..481511efe8 100644 Binary files a/gems/dry-cli/1.0/arguments/index.html.gz and b/gems/dry-cli/1.0/arguments/index.html.gz differ diff --git a/gems/dry-cli/1.0/callbacks/index.html b/gems/dry-cli/1.0/callbacks/index.html index 61fa13ffd7..2ab4300922 100644 --- a/gems/dry-cli/1.0/callbacks/index.html +++ b/gems/dry-cli/1.0/callbacks/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Callbacks

Third party gems can register before and after callbacks to enhance a command.

+});

Commands with subcommands and params

There is a way to register command with arguments, options and subcommands.

+});

Commands with subcommands and params

There is a way to register command with arguments, options and subcommands.

This helps to implement complex nested logic.

diff --git a/gems/dry-cli/1.0/commands/index.html b/gems/dry-cli/1.0/commands/index.html index 6f2a3da70c..1909e58a6d 100644 --- a/gems/dry-cli/1.0/commands/index.html +++ b/gems/dry-cli/1.0/commands/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Commands

A command is a subclass of Dry::CLI::Command and it must respond to #call(*).

+});

Commands

A command is a subclass of Dry::CLI::Command and it must respond to #call(*).

For a given command name, you can register a corresponding command.

diff --git a/gems/dry-cli/1.0/commands/index.html.gz b/gems/dry-cli/1.0/commands/index.html.gz index 2d47d4ebff..3543d5de09 100644 Binary files a/gems/dry-cli/1.0/commands/index.html.gz and b/gems/dry-cli/1.0/commands/index.html.gz differ diff --git a/gems/dry-cli/1.0/index.html b/gems/dry-cli/1.0/index.html index f02531c3b8..c41906bbbe 100644 --- a/gems/dry-cli/1.0/index.html +++ b/gems/dry-cli/1.0/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-cli is a general-purpose framework for developing Command Line Interface (CLI) applications. It represents commands as objects that can be registered and offers support for arguments, options and forwarding variadic arguments to a sub-command.

+});

Options

An option is a named argument that is passed after the command name and the arguments.

+});

Options

An option is a named argument that is passed after the command name and the arguments.

For instance, given the foo request command, when an user types foo request --mode=http2, then --mode=http2 is considered an option. A command can accept none or many options.

diff --git a/gems/dry-cli/1.0/options/index.html.gz b/gems/dry-cli/1.0/options/index.html.gz index 3ea2ec1160..7bc5426a9b 100644 Binary files a/gems/dry-cli/1.0/options/index.html.gz and b/gems/dry-cli/1.0/options/index.html.gz differ diff --git a/gems/dry-cli/1.0/subcommands/index.html b/gems/dry-cli/1.0/subcommands/index.html index acbebe94dc..975efa373c 100644 --- a/gems/dry-cli/1.0/subcommands/index.html +++ b/gems/dry-cli/1.0/subcommands/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Subcommands

There is nothing special about subcommands, they are simply command objects registered under a nested command name:

+});

Subcommands

There is nothing special about subcommands, they are simply command objects registered under a nested command name:

#!/usr/bin/env ruby
 require "bundler/setup"
 require "dry/cli"
diff --git a/gems/dry-cli/1.0/subcommands/index.html.gz b/gems/dry-cli/1.0/subcommands/index.html.gz
index 9ce65cb145..4c3e12e912 100644
Binary files a/gems/dry-cli/1.0/subcommands/index.html.gz and b/gems/dry-cli/1.0/subcommands/index.html.gz differ
diff --git a/gems/dry-cli/1.0/variadic-arguments/index.html b/gems/dry-cli/1.0/variadic-arguments/index.html
index e8b208a5a0..f1ce78a46d 100644
--- a/gems/dry-cli/1.0/variadic-arguments/index.html
+++ b/gems/dry-cli/1.0/variadic-arguments/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Variadic arguments

Sometimes we need extra arguments because those will be forwarded to a sub-command like ssh, docker or cat.

+});

Variadic arguments

Sometimes we need extra arguments because those will be forwarded to a sub-command like ssh, docker or cat.

By using -- (double dash, aka hypen), the user indicates the end of the arguments and options belonging to the main command, and the beginning of the variadic arguments that can be forwarded to the sub-command. These extra arguments are included as :args in the keyword arguments available for each command.

diff --git a/gems/dry-cli/1.0/variadic-arguments/index.html.gz b/gems/dry-cli/1.0/variadic-arguments/index.html.gz index ea56484bbd..86ceac4e50 100644 Binary files a/gems/dry-cli/1.0/variadic-arguments/index.html.gz and b/gems/dry-cli/1.0/variadic-arguments/index.html.gz differ diff --git a/gems/dry-cli/index.html.gz b/gems/dry-cli/index.html.gz index 5f2a065251..19027f7f27 100644 Binary files a/gems/dry-cli/index.html.gz and b/gems/dry-cli/index.html.gz differ diff --git a/gems/dry-cli/main/arguments/index.html b/gems/dry-cli/main/arguments/index.html index 11e656e7a4..3be196d4f2 100644 --- a/gems/dry-cli/main/arguments/index.html +++ b/gems/dry-cli/main/arguments/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Arguments

An argument is a token passed after the command name. +});

Arguments

An argument is a token passed after the command name. For instance, given the foo greet command, when an user types foo greet Luca, then Luca is considered an argument. A command can accept none or many arguments. An argument can be declared as required.

diff --git a/gems/dry-cli/main/arguments/index.html.gz b/gems/dry-cli/main/arguments/index.html.gz index 8815f5c364..c20d3bc8e4 100644 Binary files a/gems/dry-cli/main/arguments/index.html.gz and b/gems/dry-cli/main/arguments/index.html.gz differ diff --git a/gems/dry-cli/main/callbacks/index.html b/gems/dry-cli/main/callbacks/index.html index 88695d1d5b..70ac6310e8 100644 --- a/gems/dry-cli/main/callbacks/index.html +++ b/gems/dry-cli/main/callbacks/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Callbacks

Third party gems can register before and after callbacks to enhance a command.

+});

Commands with subcommands and params

There is a way to register command with arguments, options and subcommands.

+});

Commands with subcommands and params

There is a way to register command with arguments, options and subcommands.

This helps to implement complex nested logic.

diff --git a/gems/dry-cli/main/commands/index.html b/gems/dry-cli/main/commands/index.html index 7a3a598bea..2911cec5f9 100644 --- a/gems/dry-cli/main/commands/index.html +++ b/gems/dry-cli/main/commands/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Commands

A command is a subclass of Dry::CLI::Command and it must respond to #call(*).

+});

Commands

A command is a subclass of Dry::CLI::Command and it must respond to #call(*).

For a given command name, you can register a corresponding command.

diff --git a/gems/dry-cli/main/commands/index.html.gz b/gems/dry-cli/main/commands/index.html.gz index 60e0776e55..7fdb9eab9f 100644 Binary files a/gems/dry-cli/main/commands/index.html.gz and b/gems/dry-cli/main/commands/index.html.gz differ diff --git a/gems/dry-cli/main/index.html b/gems/dry-cli/main/index.html index 6855d82ed4..f07834852b 100644 --- a/gems/dry-cli/main/index.html +++ b/gems/dry-cli/main/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-cli is a general-purpose framework for developing Command Line Interface (CLI) applications. It represents commands as objects that can be registered and offers support for arguments, options and forwarding variadic arguments to a sub-command.

+});

Options

An option is a named argument that is passed after the command name and the arguments.

+});

Options

An option is a named argument that is passed after the command name and the arguments.

For instance, given the foo request command, when an user types foo request --mode=http2, then --mode=http2 is considered an option. A command can accept none or many options.

diff --git a/gems/dry-cli/main/options/index.html.gz b/gems/dry-cli/main/options/index.html.gz index 3553ac5057..79e69c1e22 100644 Binary files a/gems/dry-cli/main/options/index.html.gz and b/gems/dry-cli/main/options/index.html.gz differ diff --git a/gems/dry-cli/main/subcommands/index.html b/gems/dry-cli/main/subcommands/index.html index afca0c3008..e69911a9fd 100644 --- a/gems/dry-cli/main/subcommands/index.html +++ b/gems/dry-cli/main/subcommands/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Subcommands

There is nothing special about subcommands, they are simply command objects registered under a nested command name:

+});

Subcommands

There is nothing special about subcommands, they are simply command objects registered under a nested command name:

#!/usr/bin/env ruby
 require "bundler/setup"
 require "dry/cli"
diff --git a/gems/dry-cli/main/subcommands/index.html.gz b/gems/dry-cli/main/subcommands/index.html.gz
index b02a9cafca..280e678b44 100644
Binary files a/gems/dry-cli/main/subcommands/index.html.gz and b/gems/dry-cli/main/subcommands/index.html.gz differ
diff --git a/gems/dry-cli/main/variadic-arguments/index.html b/gems/dry-cli/main/variadic-arguments/index.html
index 8c8752b143..532c363cc6 100644
--- a/gems/dry-cli/main/variadic-arguments/index.html
+++ b/gems/dry-cli/main/variadic-arguments/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Variadic arguments

Sometimes we need extra arguments because those will be forwarded to a sub-command like ssh, docker or cat.

+});

Variadic arguments

Sometimes we need extra arguments because those will be forwarded to a sub-command like ssh, docker or cat.

By using -- (double dash, aka hypen), the user indicates the end of the arguments and options belonging to the main command, and the beginning of the variadic arguments that can be forwarded to the sub-command. These extra arguments are included as :args in the keyword arguments available for each command.

diff --git a/gems/dry-cli/main/variadic-arguments/index.html.gz b/gems/dry-cli/main/variadic-arguments/index.html.gz index 2ef21dc5ef..efb6d5c811 100644 Binary files a/gems/dry-cli/main/variadic-arguments/index.html.gz and b/gems/dry-cli/main/variadic-arguments/index.html.gz differ diff --git a/gems/dry-configurable/0.1/index.html b/gems/dry-configurable/0.1/index.html index bdde1d2ffa..4a97de1a70 100644 --- a/gems/dry-configurable/0.1/index.html +++ b/gems/dry-configurable/0.1/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction & Usage

Introduction

diff --git a/gems/dry-configurable/0.1/index.html.gz b/gems/dry-configurable/0.1/index.html.gz index 7190fb4a75..da66f3253d 100644 Binary files a/gems/dry-configurable/0.1/index.html.gz and b/gems/dry-configurable/0.1/index.html.gz differ diff --git a/gems/dry-configurable/0.1/testing/index.html b/gems/dry-configurable/0.1/testing/index.html index 8f46acf34f..d4dda5e099 100644 --- a/gems/dry-configurable/0.1/testing/index.html +++ b/gems/dry-configurable/0.1/testing/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Testing

How to reset the config to its original state on testing environment

diff --git a/gems/dry-configurable/0.1/testing/index.html.gz b/gems/dry-configurable/0.1/testing/index.html.gz index a6f4db27ec..c65f1809bd 100644 Binary files a/gems/dry-configurable/0.1/testing/index.html.gz and b/gems/dry-configurable/0.1/testing/index.html.gz differ diff --git a/gems/dry-configurable/0.10/index.html b/gems/dry-configurable/0.10/index.html index 4180b8d839..48fc5773ec 100644 --- a/gems/dry-configurable/0.10/index.html +++ b/gems/dry-configurable/0.10/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-configurable 0.10

dry-configurable 0.10

Introduction & Usage

Introduction

diff --git a/gems/dry-configurable/0.10/index.html.gz b/gems/dry-configurable/0.10/index.html.gz index 3a46585962..395fbcc8aa 100644 Binary files a/gems/dry-configurable/0.10/index.html.gz and b/gems/dry-configurable/0.10/index.html.gz differ diff --git a/gems/dry-configurable/0.10/testing/index.html b/gems/dry-configurable/0.10/testing/index.html index 0d20f217e5..c1c8722efb 100644 --- a/gems/dry-configurable/0.10/testing/index.html +++ b/gems/dry-configurable/0.10/testing/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-configurable 0.10

dry-configurable 0.10

Testing

How to reset the config to its original state on testing environment

diff --git a/gems/dry-configurable/0.10/testing/index.html.gz b/gems/dry-configurable/0.10/testing/index.html.gz index 94d9a397cb..2cf828ada0 100644 Binary files a/gems/dry-configurable/0.10/testing/index.html.gz and b/gems/dry-configurable/0.10/testing/index.html.gz differ diff --git a/gems/dry-configurable/0.11/index.html b/gems/dry-configurable/0.11/index.html index d43f902069..16ccd10ab2 100644 --- a/gems/dry-configurable/0.11/index.html +++ b/gems/dry-configurable/0.11/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-configurable 0.11

dry-configurable 0.11

Introduction & Usage

Introduction

diff --git a/gems/dry-configurable/0.11/index.html.gz b/gems/dry-configurable/0.11/index.html.gz index ea89a1eb6a..5107975779 100644 Binary files a/gems/dry-configurable/0.11/index.html.gz and b/gems/dry-configurable/0.11/index.html.gz differ diff --git a/gems/dry-configurable/0.11/testing/index.html b/gems/dry-configurable/0.11/testing/index.html index 85e8729b31..8cabcbd625 100644 --- a/gems/dry-configurable/0.11/testing/index.html +++ b/gems/dry-configurable/0.11/testing/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-configurable 0.11

dry-configurable 0.11

Testing

How to reset the config to its original state on testing environment

diff --git a/gems/dry-configurable/0.11/testing/index.html.gz b/gems/dry-configurable/0.11/testing/index.html.gz index 28f1d04678..9609f6102a 100644 Binary files a/gems/dry-configurable/0.11/testing/index.html.gz and b/gems/dry-configurable/0.11/testing/index.html.gz differ diff --git a/gems/dry-configurable/0.12/index.html b/gems/dry-configurable/0.12/index.html index a5b29a97dd..a0c659cf4b 100644 --- a/gems/dry-configurable/0.12/index.html +++ b/gems/dry-configurable/0.12/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-configurable 0.12

dry-configurable 0.12

Introduction & Usage

Introduction

diff --git a/gems/dry-configurable/0.12/index.html.gz b/gems/dry-configurable/0.12/index.html.gz index 543385ce9e..cbb7d66733 100644 Binary files a/gems/dry-configurable/0.12/index.html.gz and b/gems/dry-configurable/0.12/index.html.gz differ diff --git a/gems/dry-configurable/0.12/testing/index.html b/gems/dry-configurable/0.12/testing/index.html index e5a858c7b1..095b5db81d 100644 --- a/gems/dry-configurable/0.12/testing/index.html +++ b/gems/dry-configurable/0.12/testing/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-configurable 0.12

dry-configurable 0.12

Testing

How to reset the config to its original state on testing environment

diff --git a/gems/dry-configurable/0.12/testing/index.html.gz b/gems/dry-configurable/0.12/testing/index.html.gz index caf6f1614c..0c3e24d356 100644 Binary files a/gems/dry-configurable/0.12/testing/index.html.gz and b/gems/dry-configurable/0.12/testing/index.html.gz differ diff --git a/gems/dry-configurable/0.13/index.html b/gems/dry-configurable/0.13/index.html index ebc0b3470c..dc1bd4cdf5 100644 --- a/gems/dry-configurable/0.13/index.html +++ b/gems/dry-configurable/0.13/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-configurable 0.13

dry-configurable 0.13

Introduction & Usage

Introduction

diff --git a/gems/dry-configurable/0.13/index.html.gz b/gems/dry-configurable/0.13/index.html.gz index 791a18a275..f16a4e1005 100644 Binary files a/gems/dry-configurable/0.13/index.html.gz and b/gems/dry-configurable/0.13/index.html.gz differ diff --git a/gems/dry-configurable/0.13/testing/index.html b/gems/dry-configurable/0.13/testing/index.html index a3342ac407..15d1f895e0 100644 --- a/gems/dry-configurable/0.13/testing/index.html +++ b/gems/dry-configurable/0.13/testing/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-configurable 0.13

dry-configurable 0.13

Testing

How to reset the config to its original state on testing environment

diff --git a/gems/dry-configurable/0.13/testing/index.html.gz b/gems/dry-configurable/0.13/testing/index.html.gz index 56ec8b4d8c..40209968df 100644 Binary files a/gems/dry-configurable/0.13/testing/index.html.gz and b/gems/dry-configurable/0.13/testing/index.html.gz differ diff --git a/gems/dry-configurable/0.14/index.html b/gems/dry-configurable/0.14/index.html index 1c55e5a7a2..e4898454ff 100644 --- a/gems/dry-configurable/0.14/index.html +++ b/gems/dry-configurable/0.14/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-configurable 0.14

dry-configurable 0.14

Introduction & Usage

Introduction

diff --git a/gems/dry-configurable/0.14/index.html.gz b/gems/dry-configurable/0.14/index.html.gz index d226ec0fd6..e0901e88b4 100644 Binary files a/gems/dry-configurable/0.14/index.html.gz and b/gems/dry-configurable/0.14/index.html.gz differ diff --git a/gems/dry-configurable/0.14/testing/index.html b/gems/dry-configurable/0.14/testing/index.html index 30075f53e3..ba7408b6e3 100644 --- a/gems/dry-configurable/0.14/testing/index.html +++ b/gems/dry-configurable/0.14/testing/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-configurable 0.14

dry-configurable 0.14

Testing

How to reset the config to its original state on testing environment

diff --git a/gems/dry-configurable/0.14/testing/index.html.gz b/gems/dry-configurable/0.14/testing/index.html.gz index 92c267a17f..2bf2b949de 100644 Binary files a/gems/dry-configurable/0.14/testing/index.html.gz and b/gems/dry-configurable/0.14/testing/index.html.gz differ diff --git a/gems/dry-configurable/0.15/index.html b/gems/dry-configurable/0.15/index.html index ebda72638a..3a80a2858e 100644 --- a/gems/dry-configurable/0.15/index.html +++ b/gems/dry-configurable/0.15/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-configurable 0.15

dry-configurable 0.15

Introduction & Usage

Introduction

diff --git a/gems/dry-configurable/0.15/index.html.gz b/gems/dry-configurable/0.15/index.html.gz index 10b388bb5c..117eeb0810 100644 Binary files a/gems/dry-configurable/0.15/index.html.gz and b/gems/dry-configurable/0.15/index.html.gz differ diff --git a/gems/dry-configurable/0.15/testing/index.html b/gems/dry-configurable/0.15/testing/index.html index e25c1603ad..db759009d3 100644 --- a/gems/dry-configurable/0.15/testing/index.html +++ b/gems/dry-configurable/0.15/testing/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-configurable 0.15

dry-configurable 0.15

Testing

How to reset the config to its original state on testing environment

diff --git a/gems/dry-configurable/0.15/testing/index.html.gz b/gems/dry-configurable/0.15/testing/index.html.gz index a0cd099994..e7bdeadadd 100644 Binary files a/gems/dry-configurable/0.15/testing/index.html.gz and b/gems/dry-configurable/0.15/testing/index.html.gz differ diff --git a/gems/dry-configurable/0.16/index.html b/gems/dry-configurable/0.16/index.html index 81ec57062f..480c722355 100644 --- a/gems/dry-configurable/0.16/index.html +++ b/gems/dry-configurable/0.16/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-configurable 0.16

dry-configurable 0.16

Introduction & Usage

Introduction

diff --git a/gems/dry-configurable/0.16/index.html.gz b/gems/dry-configurable/0.16/index.html.gz index 7e5237f347..2db9299427 100644 Binary files a/gems/dry-configurable/0.16/index.html.gz and b/gems/dry-configurable/0.16/index.html.gz differ diff --git a/gems/dry-configurable/0.16/testing/index.html b/gems/dry-configurable/0.16/testing/index.html index b686821b06..d67f38f020 100644 --- a/gems/dry-configurable/0.16/testing/index.html +++ b/gems/dry-configurable/0.16/testing/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-configurable 0.16

dry-configurable 0.16

Testing

How to reset the config to its original state on testing environment

diff --git a/gems/dry-configurable/0.16/testing/index.html.gz b/gems/dry-configurable/0.16/testing/index.html.gz index afb2e585b7..993c66580e 100644 Binary files a/gems/dry-configurable/0.16/testing/index.html.gz and b/gems/dry-configurable/0.16/testing/index.html.gz differ diff --git a/gems/dry-configurable/0.8/index.html b/gems/dry-configurable/0.8/index.html index 61fb48832c..3fd70d82b4 100644 --- a/gems/dry-configurable/0.8/index.html +++ b/gems/dry-configurable/0.8/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction & Usage

Introduction

diff --git a/gems/dry-configurable/0.8/index.html.gz b/gems/dry-configurable/0.8/index.html.gz index bcd524cf94..02e41aec95 100644 Binary files a/gems/dry-configurable/0.8/index.html.gz and b/gems/dry-configurable/0.8/index.html.gz differ diff --git a/gems/dry-configurable/0.8/testing/index.html b/gems/dry-configurable/0.8/testing/index.html index 869d169bca..2b920ce5ba 100644 --- a/gems/dry-configurable/0.8/testing/index.html +++ b/gems/dry-configurable/0.8/testing/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Testing

How to reset the config to its original state on testing environment

diff --git a/gems/dry-configurable/0.8/testing/index.html.gz b/gems/dry-configurable/0.8/testing/index.html.gz index 7ccc3ce0b7..34718f4dda 100644 Binary files a/gems/dry-configurable/0.8/testing/index.html.gz and b/gems/dry-configurable/0.8/testing/index.html.gz differ diff --git a/gems/dry-configurable/0.9/index.html b/gems/dry-configurable/0.9/index.html index ff449fd582..8368ab4d3b 100644 --- a/gems/dry-configurable/0.9/index.html +++ b/gems/dry-configurable/0.9/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction & Usage

Introduction

diff --git a/gems/dry-configurable/0.9/index.html.gz b/gems/dry-configurable/0.9/index.html.gz index 7ad480e94f..2837d5eebc 100644 Binary files a/gems/dry-configurable/0.9/index.html.gz and b/gems/dry-configurable/0.9/index.html.gz differ diff --git a/gems/dry-configurable/0.9/testing/index.html b/gems/dry-configurable/0.9/testing/index.html index 04042c7916..72d9c6045d 100644 --- a/gems/dry-configurable/0.9/testing/index.html +++ b/gems/dry-configurable/0.9/testing/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Testing

How to reset the config to its original state on testing environment

diff --git a/gems/dry-configurable/0.9/testing/index.html.gz b/gems/dry-configurable/0.9/testing/index.html.gz index b99bfcd262..bdc31980b5 100644 Binary files a/gems/dry-configurable/0.9/testing/index.html.gz and b/gems/dry-configurable/0.9/testing/index.html.gz differ diff --git a/gems/dry-configurable/1.0/index.html b/gems/dry-configurable/1.0/index.html index 1ca705ca62..8ee120ee39 100644 --- a/gems/dry-configurable/1.0/index.html +++ b/gems/dry-configurable/1.0/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction & Usage

Introduction

diff --git a/gems/dry-configurable/1.0/index.html.gz b/gems/dry-configurable/1.0/index.html.gz index 298704d676..0ee1244e79 100644 Binary files a/gems/dry-configurable/1.0/index.html.gz and b/gems/dry-configurable/1.0/index.html.gz differ diff --git a/gems/dry-configurable/1.0/testing/index.html b/gems/dry-configurable/1.0/testing/index.html index ab33c54cfd..7c6e0a072d 100644 --- a/gems/dry-configurable/1.0/testing/index.html +++ b/gems/dry-configurable/1.0/testing/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Testing

How to reset the config to its original state on testing environment

diff --git a/gems/dry-configurable/1.0/testing/index.html.gz b/gems/dry-configurable/1.0/testing/index.html.gz index 2425cfd4a2..c7006f1dd5 100644 Binary files a/gems/dry-configurable/1.0/testing/index.html.gz and b/gems/dry-configurable/1.0/testing/index.html.gz differ diff --git a/gems/dry-configurable/index.html.gz b/gems/dry-configurable/index.html.gz index 7b5475801f..7e08bfc7ae 100644 Binary files a/gems/dry-configurable/index.html.gz and b/gems/dry-configurable/index.html.gz differ diff --git a/gems/dry-configurable/main/index.html b/gems/dry-configurable/main/index.html index 4826ac4d26..47554091ed 100644 --- a/gems/dry-configurable/main/index.html +++ b/gems/dry-configurable/main/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-configurable main

dry-configurable main

Introduction & Usage

Introduction

diff --git a/gems/dry-configurable/main/index.html.gz b/gems/dry-configurable/main/index.html.gz index c004ef7928..7993dcfc97 100644 Binary files a/gems/dry-configurable/main/index.html.gz and b/gems/dry-configurable/main/index.html.gz differ diff --git a/gems/dry-configurable/main/testing/index.html b/gems/dry-configurable/main/testing/index.html index 50e981a2e4..2b959b4ab9 100644 --- a/gems/dry-configurable/main/testing/index.html +++ b/gems/dry-configurable/main/testing/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-configurable main

dry-configurable main

Testing

How to reset the config to its original state on testing environment

diff --git a/gems/dry-configurable/main/testing/index.html.gz b/gems/dry-configurable/main/testing/index.html.gz index 9437873c2e..6d746ab4d4 100644 Binary files a/gems/dry-configurable/main/testing/index.html.gz and b/gems/dry-configurable/main/testing/index.html.gz differ diff --git a/gems/dry-container/0.1/index.html b/gems/dry-container/0.1/index.html index 78ba083452..70334b8226 100644 --- a/gems/dry-container/0.1/index.html +++ b/gems/dry-container/0.1/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction & Usage

Introduction

diff --git a/gems/dry-container/0.1/index.html.gz b/gems/dry-container/0.1/index.html.gz index 423511c8fd..a6c217347a 100644 Binary files a/gems/dry-container/0.1/index.html.gz and b/gems/dry-container/0.1/index.html.gz differ diff --git a/gems/dry-container/0.1/registry-and-resolver/index.html b/gems/dry-container/0.1/registry-and-resolver/index.html index 14974b5c02..4970494cf0 100644 --- a/gems/dry-container/0.1/registry-and-resolver/index.html +++ b/gems/dry-container/0.1/registry-and-resolver/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Testing

Stub

diff --git a/gems/dry-container/0.1/testing/index.html.gz b/gems/dry-container/0.1/testing/index.html.gz index e76cfe913a..f851bab073 100644 Binary files a/gems/dry-container/0.1/testing/index.html.gz and b/gems/dry-container/0.1/testing/index.html.gz differ diff --git a/gems/dry-container/0.10/index.html b/gems/dry-container/0.10/index.html index 201a3866c2..348bae23c7 100644 --- a/gems/dry-container/0.10/index.html +++ b/gems/dry-container/0.10/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction & Usage

Introduction

diff --git a/gems/dry-container/0.10/index.html.gz b/gems/dry-container/0.10/index.html.gz index ffc56d6b7a..9f70048556 100644 Binary files a/gems/dry-container/0.10/index.html.gz and b/gems/dry-container/0.10/index.html.gz differ diff --git a/gems/dry-container/0.10/registry-and-resolver/index.html b/gems/dry-container/0.10/registry-and-resolver/index.html index 8c1b7ffab5..f9f7975262 100644 --- a/gems/dry-container/0.10/registry-and-resolver/index.html +++ b/gems/dry-container/0.10/registry-and-resolver/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Testing

Stub

diff --git a/gems/dry-container/0.10/testing/index.html.gz b/gems/dry-container/0.10/testing/index.html.gz index 75593dbb11..6df1710a72 100644 Binary files a/gems/dry-container/0.10/testing/index.html.gz and b/gems/dry-container/0.10/testing/index.html.gz differ diff --git a/gems/dry-container/0.11/index.html b/gems/dry-container/0.11/index.html index 63d900560d..c6091a4da5 100644 --- a/gems/dry-container/0.11/index.html +++ b/gems/dry-container/0.11/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction & Usage

Introduction

diff --git a/gems/dry-container/0.11/index.html.gz b/gems/dry-container/0.11/index.html.gz index 0abee39eb8..86701ba0b7 100644 Binary files a/gems/dry-container/0.11/index.html.gz and b/gems/dry-container/0.11/index.html.gz differ diff --git a/gems/dry-container/0.11/registry-and-resolver/index.html b/gems/dry-container/0.11/registry-and-resolver/index.html index b4cce72bd3..5607f4e77f 100644 --- a/gems/dry-container/0.11/registry-and-resolver/index.html +++ b/gems/dry-container/0.11/registry-and-resolver/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Testing

Stub

diff --git a/gems/dry-container/0.11/testing/index.html.gz b/gems/dry-container/0.11/testing/index.html.gz index 2c35916959..4ec003c225 100644 Binary files a/gems/dry-container/0.11/testing/index.html.gz and b/gems/dry-container/0.11/testing/index.html.gz differ diff --git a/gems/dry-container/0.7/index.html b/gems/dry-container/0.7/index.html index 5c8ec9aa52..1b1c1c032e 100644 --- a/gems/dry-container/0.7/index.html +++ b/gems/dry-container/0.7/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction & Usage

Introduction

diff --git a/gems/dry-container/0.7/index.html.gz b/gems/dry-container/0.7/index.html.gz index d032ec4567..56fb1a9155 100644 Binary files a/gems/dry-container/0.7/index.html.gz and b/gems/dry-container/0.7/index.html.gz differ diff --git a/gems/dry-container/0.7/registry-and-resolver/index.html b/gems/dry-container/0.7/registry-and-resolver/index.html index 65978b48b6..ac27aec92a 100644 --- a/gems/dry-container/0.7/registry-and-resolver/index.html +++ b/gems/dry-container/0.7/registry-and-resolver/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Testing

Stub

diff --git a/gems/dry-container/0.7/testing/index.html.gz b/gems/dry-container/0.7/testing/index.html.gz index 473816ccab..f81802ffe3 100644 Binary files a/gems/dry-container/0.7/testing/index.html.gz and b/gems/dry-container/0.7/testing/index.html.gz differ diff --git a/gems/dry-container/0.8/index.html b/gems/dry-container/0.8/index.html index 1f817d4596..6277a2705a 100644 --- a/gems/dry-container/0.8/index.html +++ b/gems/dry-container/0.8/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction & Usage

Introduction

diff --git a/gems/dry-container/0.8/index.html.gz b/gems/dry-container/0.8/index.html.gz index 5ba0b29f3a..38e28530d0 100644 Binary files a/gems/dry-container/0.8/index.html.gz and b/gems/dry-container/0.8/index.html.gz differ diff --git a/gems/dry-container/0.8/registry-and-resolver/index.html b/gems/dry-container/0.8/registry-and-resolver/index.html index e2d5649532..da0d273e8c 100644 --- a/gems/dry-container/0.8/registry-and-resolver/index.html +++ b/gems/dry-container/0.8/registry-and-resolver/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Testing

Stub

diff --git a/gems/dry-container/0.8/testing/index.html.gz b/gems/dry-container/0.8/testing/index.html.gz index bdcd983a40..42671897ff 100644 Binary files a/gems/dry-container/0.8/testing/index.html.gz and b/gems/dry-container/0.8/testing/index.html.gz differ diff --git a/gems/dry-container/index.html.gz b/gems/dry-container/index.html.gz index 7d4cf7376e..738cc77788 100644 Binary files a/gems/dry-container/index.html.gz and b/gems/dry-container/index.html.gz differ diff --git a/gems/dry-container/main/index.html b/gems/dry-container/main/index.html index 9c9e62dbfa..259f922bc5 100644 --- a/gems/dry-container/main/index.html +++ b/gems/dry-container/main/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction & Usage

Introduction

diff --git a/gems/dry-container/main/index.html.gz b/gems/dry-container/main/index.html.gz index 13cb8cf9d9..0d10befd9c 100644 Binary files a/gems/dry-container/main/index.html.gz and b/gems/dry-container/main/index.html.gz differ diff --git a/gems/dry-container/main/registry-and-resolver/index.html b/gems/dry-container/main/registry-and-resolver/index.html index e89f9c4f99..23b51812e0 100644 --- a/gems/dry-container/main/registry-and-resolver/index.html +++ b/gems/dry-container/main/registry-and-resolver/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Testing

Stub

diff --git a/gems/dry-container/main/testing/index.html.gz b/gems/dry-container/main/testing/index.html.gz index a084ea392c..d159457a97 100644 Binary files a/gems/dry-container/main/testing/index.html.gz and b/gems/dry-container/main/testing/index.html.gz differ diff --git a/gems/dry-core/0.4/cache/index.html b/gems/dry-core/0.4/cache/index.html index 9280836366..d5e913f8d4 100644 --- a/gems/dry-core/0.4/cache/index.html +++ b/gems/dry-core/0.4/cache/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Cache

Allows you to cache call results that are solely determined by arguments.

+});

Cache

Allows you to cache call results that are solely determined by arguments.

require 'dry/core/cache'
 
 class Foo
diff --git a/gems/dry-core/0.4/cache/index.html.gz b/gems/dry-core/0.4/cache/index.html.gz
index 8bca7b42a5..cd89f009a1 100644
Binary files a/gems/dry-core/0.4/cache/index.html.gz and b/gems/dry-core/0.4/cache/index.html.gz differ
diff --git a/gems/dry-core/0.4/classes/class-attributes/index.html b/gems/dry-core/0.4/classes/class-attributes/index.html
index 0eecc12b5a..38808287d8 100644
--- a/gems/dry-core/0.4/classes/class-attributes/index.html
+++ b/gems/dry-core/0.4/classes/class-attributes/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class Attributes

require 'dry/core/class_attributes'
+});

Class Attributes

require 'dry/core/class_attributes'
 
 class ExtraClass
   extend Dry::Core::ClassAttributes
diff --git a/gems/dry-core/0.4/classes/class-attributes/index.html.gz b/gems/dry-core/0.4/classes/class-attributes/index.html.gz
index 3e14dac79d..8a6eff1801 100644
Binary files a/gems/dry-core/0.4/classes/class-attributes/index.html.gz and b/gems/dry-core/0.4/classes/class-attributes/index.html.gz differ
diff --git a/gems/dry-core/0.4/classes/class-builder/index.html b/gems/dry-core/0.4/classes/class-builder/index.html
index 9c879c0bfc..3cd0d4e055 100644
--- a/gems/dry-core/0.4/classes/class-builder/index.html
+++ b/gems/dry-core/0.4/classes/class-builder/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class Builder

require 'dry/core/class_builder'
+});

Class Builder

require 'dry/core/class_builder'
 
 builder = Dry::Core::ClassBuilder.new(name: 'MyClass')
 
diff --git a/gems/dry-core/0.4/classes/class-builder/index.html.gz b/gems/dry-core/0.4/classes/class-builder/index.html.gz
index bf450e31ba..50be551d31 100644
Binary files a/gems/dry-core/0.4/classes/class-builder/index.html.gz and b/gems/dry-core/0.4/classes/class-builder/index.html.gz differ
diff --git a/gems/dry-core/0.4/classes/index.html b/gems/dry-core/0.4/classes/index.html
index e9d8b58043..26887d8b0a 100644
--- a/gems/dry-core/0.4/classes/index.html
+++ b/gems/dry-core/0.4/classes/index.html
@@ -3,5 +3,5 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});
\ No newline at end of file diff --git a/gems/dry-core/0.4/classes/index.html.gz b/gems/dry-core/0.4/classes/index.html.gz index 39aa7d6d3b..4386c73128 100644 Binary files a/gems/dry-core/0.4/classes/index.html.gz and b/gems/dry-core/0.4/classes/index.html.gz differ diff --git a/gems/dry-core/0.4/constants/index.html b/gems/dry-core/0.4/constants/index.html index 8fe8dd5e6d..812de90ecd 100644 --- a/gems/dry-core/0.4/constants/index.html +++ b/gems/dry-core/0.4/constants/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Constants

A list of constants you can use to avoid memory allocations or identity checks.

+});

Constants

A list of constants you can use to avoid memory allocations or identity checks.

  • EMPTY_ARRAY
  • diff --git a/gems/dry-core/0.4/constants/index.html.gz b/gems/dry-core/0.4/constants/index.html.gz index 587849f77a..f0ddff5e3f 100644 Binary files a/gems/dry-core/0.4/constants/index.html.gz and b/gems/dry-core/0.4/constants/index.html.gz differ diff --git a/gems/dry-core/0.4/deprecations/index.html b/gems/dry-core/0.4/deprecations/index.html index e3def9ec7e..f9daee3ec3 100644 --- a/gems/dry-core/0.4/deprecations/index.html +++ b/gems/dry-core/0.4/deprecations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Deprecations

For deprecate ruby methods you need to extend Dry::Core::Deprecations module with a tag that will be displayed in the output. For example:

+});

Deprecations

For deprecate ruby methods you need to extend Dry::Core::Deprecations module with a tag that will be displayed in the output. For example:

require 'dry/core/deprecations'
 
 class Foo
diff --git a/gems/dry-core/0.4/deprecations/index.html.gz b/gems/dry-core/0.4/deprecations/index.html.gz
index 6bc05b333e..74eea8d9fa 100644
Binary files a/gems/dry-core/0.4/deprecations/index.html.gz and b/gems/dry-core/0.4/deprecations/index.html.gz differ
diff --git a/gems/dry-core/0.4/extensions/index.html b/gems/dry-core/0.4/extensions/index.html
index ca0050f06b..a1a37f2fbc 100644
--- a/gems/dry-core/0.4/extensions/index.html
+++ b/gems/dry-core/0.4/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

Define extensions that can be later enabled by the user.

+});

Extensions

Define extensions that can be later enabled by the user.

require 'dry/core/extensions'
 
 class Foo
diff --git a/gems/dry-core/0.4/extensions/index.html.gz b/gems/dry-core/0.4/extensions/index.html.gz
index 99daf3ea9c..d91efaccba 100644
Binary files a/gems/dry-core/0.4/extensions/index.html.gz and b/gems/dry-core/0.4/extensions/index.html.gz differ
diff --git a/gems/dry-core/0.4/index.html b/gems/dry-core/0.4/index.html
index 1f13dfaab9..2733791107 100644
--- a/gems/dry-core/0.4/index.html
+++ b/gems/dry-core/0.4/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-core is a simple toolset that can be used in many places.

+});

Cache

Allows you to cache call results that are solely determined by arguments.

+});

Cache

Allows you to cache call results that are solely determined by arguments.

require 'dry/core/cache'
 
 class Foo
diff --git a/gems/dry-core/0.5/cache/index.html.gz b/gems/dry-core/0.5/cache/index.html.gz
index eac5586c50..3b1a6bde63 100644
Binary files a/gems/dry-core/0.5/cache/index.html.gz and b/gems/dry-core/0.5/cache/index.html.gz differ
diff --git a/gems/dry-core/0.5/classes/class-attributes/index.html b/gems/dry-core/0.5/classes/class-attributes/index.html
index db9e5e9946..61fec40aa7 100644
--- a/gems/dry-core/0.5/classes/class-attributes/index.html
+++ b/gems/dry-core/0.5/classes/class-attributes/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class Attributes

require 'dry/core/class_attributes'
+});

Class Attributes

require 'dry/core/class_attributes'
 
 class ExtraClass
   extend Dry::Core::ClassAttributes
diff --git a/gems/dry-core/0.5/classes/class-attributes/index.html.gz b/gems/dry-core/0.5/classes/class-attributes/index.html.gz
index c4e1e82723..2fb36c04ec 100644
Binary files a/gems/dry-core/0.5/classes/class-attributes/index.html.gz and b/gems/dry-core/0.5/classes/class-attributes/index.html.gz differ
diff --git a/gems/dry-core/0.5/classes/class-builder/index.html b/gems/dry-core/0.5/classes/class-builder/index.html
index b7f579dcf8..6e1386ebea 100644
--- a/gems/dry-core/0.5/classes/class-builder/index.html
+++ b/gems/dry-core/0.5/classes/class-builder/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class Builder

require 'dry/core/class_builder'
+});

Class Builder

require 'dry/core/class_builder'
 
 builder = Dry::Core::ClassBuilder.new(name: 'MyClass')
 
diff --git a/gems/dry-core/0.5/classes/class-builder/index.html.gz b/gems/dry-core/0.5/classes/class-builder/index.html.gz
index a5c0e8af79..5be490f212 100644
Binary files a/gems/dry-core/0.5/classes/class-builder/index.html.gz and b/gems/dry-core/0.5/classes/class-builder/index.html.gz differ
diff --git a/gems/dry-core/0.5/classes/index.html b/gems/dry-core/0.5/classes/index.html
index d3bd4a003a..e77efb8e72 100644
--- a/gems/dry-core/0.5/classes/index.html
+++ b/gems/dry-core/0.5/classes/index.html
@@ -3,5 +3,5 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});
\ No newline at end of file diff --git a/gems/dry-core/0.5/classes/index.html.gz b/gems/dry-core/0.5/classes/index.html.gz index 168d26b564..62742f3409 100644 Binary files a/gems/dry-core/0.5/classes/index.html.gz and b/gems/dry-core/0.5/classes/index.html.gz differ diff --git a/gems/dry-core/0.5/constants/index.html b/gems/dry-core/0.5/constants/index.html index 30889ce1a5..00696bbfc1 100644 --- a/gems/dry-core/0.5/constants/index.html +++ b/gems/dry-core/0.5/constants/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Constants

A list of constants you can use to avoid memory allocations or identity checks.

+});

Constants

A list of constants you can use to avoid memory allocations or identity checks.

  • EMPTY_ARRAY
  • diff --git a/gems/dry-core/0.5/constants/index.html.gz b/gems/dry-core/0.5/constants/index.html.gz index f2d25ae481..d353c444f9 100644 Binary files a/gems/dry-core/0.5/constants/index.html.gz and b/gems/dry-core/0.5/constants/index.html.gz differ diff --git a/gems/dry-core/0.5/deprecations/index.html b/gems/dry-core/0.5/deprecations/index.html index bcde6fc7f1..06d7ac2ef0 100644 --- a/gems/dry-core/0.5/deprecations/index.html +++ b/gems/dry-core/0.5/deprecations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Deprecations

To deprecate ruby methods you need to extend the Dry::Core::Deprecations module with a tag that will be displayed in the output. For example:

+});

Deprecations

To deprecate ruby methods you need to extend the Dry::Core::Deprecations module with a tag that will be displayed in the output. For example:

require 'dry/core/deprecations'
 
 class Foo
diff --git a/gems/dry-core/0.5/deprecations/index.html.gz b/gems/dry-core/0.5/deprecations/index.html.gz
index c6128a73e3..daa5b724ca 100644
Binary files a/gems/dry-core/0.5/deprecations/index.html.gz and b/gems/dry-core/0.5/deprecations/index.html.gz differ
diff --git a/gems/dry-core/0.5/extensions/index.html b/gems/dry-core/0.5/extensions/index.html
index 9bc5a3452f..d0361308bb 100644
--- a/gems/dry-core/0.5/extensions/index.html
+++ b/gems/dry-core/0.5/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

Define extensions that can be later enabled by the user.

+});

Extensions

Define extensions that can be later enabled by the user.

require 'dry/core/extensions'
 
 class Foo
diff --git a/gems/dry-core/0.5/extensions/index.html.gz b/gems/dry-core/0.5/extensions/index.html.gz
index e83e17d48a..b9712439b3 100644
Binary files a/gems/dry-core/0.5/extensions/index.html.gz and b/gems/dry-core/0.5/extensions/index.html.gz differ
diff --git a/gems/dry-core/0.5/index.html b/gems/dry-core/0.5/index.html
index 18cc00bdab..dae2a3a5dd 100644
--- a/gems/dry-core/0.5/index.html
+++ b/gems/dry-core/0.5/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-core is a simple toolset that can be used in many places.

+});

Cache

Allows you to cache call results that are solely determined by arguments.

+});

Cache

Allows you to cache call results that are solely determined by arguments.

require 'dry/core/cache'
 
 class Foo
diff --git a/gems/dry-core/0.6/cache/index.html.gz b/gems/dry-core/0.6/cache/index.html.gz
index 6068295f41..4163056f7f 100644
Binary files a/gems/dry-core/0.6/cache/index.html.gz and b/gems/dry-core/0.6/cache/index.html.gz differ
diff --git a/gems/dry-core/0.6/classes/class-attributes/index.html b/gems/dry-core/0.6/classes/class-attributes/index.html
index b8f5aaadb9..6a89f7da4b 100644
--- a/gems/dry-core/0.6/classes/class-attributes/index.html
+++ b/gems/dry-core/0.6/classes/class-attributes/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class Attributes

require 'dry/core/class_attributes'
+});

Class Attributes

require 'dry/core/class_attributes'
 
 class ExtraClass
   extend Dry::Core::ClassAttributes
diff --git a/gems/dry-core/0.6/classes/class-attributes/index.html.gz b/gems/dry-core/0.6/classes/class-attributes/index.html.gz
index 8394e98b0b..ef12840f8a 100644
Binary files a/gems/dry-core/0.6/classes/class-attributes/index.html.gz and b/gems/dry-core/0.6/classes/class-attributes/index.html.gz differ
diff --git a/gems/dry-core/0.6/classes/class-builder/index.html b/gems/dry-core/0.6/classes/class-builder/index.html
index 7a5dbd6f53..4ef6e2172d 100644
--- a/gems/dry-core/0.6/classes/class-builder/index.html
+++ b/gems/dry-core/0.6/classes/class-builder/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class Builder

require 'dry/core/class_builder'
+});

Class Builder

require 'dry/core/class_builder'
 
 builder = Dry::Core::ClassBuilder.new(name: 'MyClass')
 
diff --git a/gems/dry-core/0.6/classes/class-builder/index.html.gz b/gems/dry-core/0.6/classes/class-builder/index.html.gz
index 30128641ff..2468fb94a5 100644
Binary files a/gems/dry-core/0.6/classes/class-builder/index.html.gz and b/gems/dry-core/0.6/classes/class-builder/index.html.gz differ
diff --git a/gems/dry-core/0.6/classes/index.html b/gems/dry-core/0.6/classes/index.html
index 076d5e1666..d7182df7fd 100644
--- a/gems/dry-core/0.6/classes/index.html
+++ b/gems/dry-core/0.6/classes/index.html
@@ -3,5 +3,5 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});
\ No newline at end of file diff --git a/gems/dry-core/0.6/classes/index.html.gz b/gems/dry-core/0.6/classes/index.html.gz index c5a5c47022..33b1c039f3 100644 Binary files a/gems/dry-core/0.6/classes/index.html.gz and b/gems/dry-core/0.6/classes/index.html.gz differ diff --git a/gems/dry-core/0.6/constants/index.html b/gems/dry-core/0.6/constants/index.html index 7b57398976..b0940d5663 100644 --- a/gems/dry-core/0.6/constants/index.html +++ b/gems/dry-core/0.6/constants/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Constants

A list of constants you can use to avoid memory allocations or identity checks.

+});

Constants

A list of constants you can use to avoid memory allocations or identity checks.

  • EMPTY_ARRAY
  • diff --git a/gems/dry-core/0.6/constants/index.html.gz b/gems/dry-core/0.6/constants/index.html.gz index 89d694f83a..b12ae9f203 100644 Binary files a/gems/dry-core/0.6/constants/index.html.gz and b/gems/dry-core/0.6/constants/index.html.gz differ diff --git a/gems/dry-core/0.6/deprecations/index.html b/gems/dry-core/0.6/deprecations/index.html index 0664f91250..99e5eca439 100644 --- a/gems/dry-core/0.6/deprecations/index.html +++ b/gems/dry-core/0.6/deprecations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Deprecations

To deprecate ruby methods you need to extend the Dry::Core::Deprecations module with a tag that will be displayed in the output. For example:

+});

Deprecations

To deprecate ruby methods you need to extend the Dry::Core::Deprecations module with a tag that will be displayed in the output. For example:

require 'dry/core/deprecations'
 
 class Foo
diff --git a/gems/dry-core/0.6/deprecations/index.html.gz b/gems/dry-core/0.6/deprecations/index.html.gz
index 982b08f2cd..496f4a2e9a 100644
Binary files a/gems/dry-core/0.6/deprecations/index.html.gz and b/gems/dry-core/0.6/deprecations/index.html.gz differ
diff --git a/gems/dry-core/0.6/extensions/index.html b/gems/dry-core/0.6/extensions/index.html
index 824625858a..6abe1f9b51 100644
--- a/gems/dry-core/0.6/extensions/index.html
+++ b/gems/dry-core/0.6/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

Define extensions that can be later enabled by the user.

+});

Extensions

Define extensions that can be later enabled by the user.

require 'dry/core/extensions'
 
 class Foo
diff --git a/gems/dry-core/0.6/extensions/index.html.gz b/gems/dry-core/0.6/extensions/index.html.gz
index 77decd7b74..1a7a9676d3 100644
Binary files a/gems/dry-core/0.6/extensions/index.html.gz and b/gems/dry-core/0.6/extensions/index.html.gz differ
diff --git a/gems/dry-core/0.6/index.html b/gems/dry-core/0.6/index.html
index e8f51b5f30..730fb89f37 100644
--- a/gems/dry-core/0.6/index.html
+++ b/gems/dry-core/0.6/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-core is a simple toolset that can be used in many places.

+});

Cache

Allows you to cache call results that are solely determined by arguments.

+});

Cache

Allows you to cache call results that are solely determined by arguments.

require 'dry/core/cache'
 
 class Foo
diff --git a/gems/dry-core/0.7/cache/index.html.gz b/gems/dry-core/0.7/cache/index.html.gz
index be15d21240..1dad50abba 100644
Binary files a/gems/dry-core/0.7/cache/index.html.gz and b/gems/dry-core/0.7/cache/index.html.gz differ
diff --git a/gems/dry-core/0.7/classes/class-attributes/index.html b/gems/dry-core/0.7/classes/class-attributes/index.html
index 569818955d..564b72ac5f 100644
--- a/gems/dry-core/0.7/classes/class-attributes/index.html
+++ b/gems/dry-core/0.7/classes/class-attributes/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class Attributes

require 'dry/core/class_attributes'
+});

Class Attributes

require 'dry/core/class_attributes'
 
 class ExtraClass
   extend Dry::Core::ClassAttributes
diff --git a/gems/dry-core/0.7/classes/class-attributes/index.html.gz b/gems/dry-core/0.7/classes/class-attributes/index.html.gz
index 91ccfc1930..a9bd2ab679 100644
Binary files a/gems/dry-core/0.7/classes/class-attributes/index.html.gz and b/gems/dry-core/0.7/classes/class-attributes/index.html.gz differ
diff --git a/gems/dry-core/0.7/classes/class-builder/index.html b/gems/dry-core/0.7/classes/class-builder/index.html
index 3e43e37004..207b34d543 100644
--- a/gems/dry-core/0.7/classes/class-builder/index.html
+++ b/gems/dry-core/0.7/classes/class-builder/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class Builder

require 'dry/core/class_builder'
+});

Class Builder

require 'dry/core/class_builder'
 
 builder = Dry::Core::ClassBuilder.new(name: 'MyClass')
 
diff --git a/gems/dry-core/0.7/classes/class-builder/index.html.gz b/gems/dry-core/0.7/classes/class-builder/index.html.gz
index 0346c68433..1be8c9634b 100644
Binary files a/gems/dry-core/0.7/classes/class-builder/index.html.gz and b/gems/dry-core/0.7/classes/class-builder/index.html.gz differ
diff --git a/gems/dry-core/0.7/classes/index.html b/gems/dry-core/0.7/classes/index.html
index 866e97cacb..dfa152c5bc 100644
--- a/gems/dry-core/0.7/classes/index.html
+++ b/gems/dry-core/0.7/classes/index.html
@@ -3,5 +3,5 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});
\ No newline at end of file diff --git a/gems/dry-core/0.7/classes/index.html.gz b/gems/dry-core/0.7/classes/index.html.gz index 5ee0c8420f..762ebe4297 100644 Binary files a/gems/dry-core/0.7/classes/index.html.gz and b/gems/dry-core/0.7/classes/index.html.gz differ diff --git a/gems/dry-core/0.7/constants/index.html b/gems/dry-core/0.7/constants/index.html index e7729fa58b..0053f56fd6 100644 --- a/gems/dry-core/0.7/constants/index.html +++ b/gems/dry-core/0.7/constants/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Constants

A list of constants you can use to avoid memory allocations or identity checks.

+});

Constants

A list of constants you can use to avoid memory allocations or identity checks.

  • EMPTY_ARRAY
  • diff --git a/gems/dry-core/0.7/constants/index.html.gz b/gems/dry-core/0.7/constants/index.html.gz index ee2b7bf4d4..dfe4bbec38 100644 Binary files a/gems/dry-core/0.7/constants/index.html.gz and b/gems/dry-core/0.7/constants/index.html.gz differ diff --git a/gems/dry-core/0.7/deprecations/index.html b/gems/dry-core/0.7/deprecations/index.html index 40dc704985..17e7da6045 100644 --- a/gems/dry-core/0.7/deprecations/index.html +++ b/gems/dry-core/0.7/deprecations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Deprecations

To deprecate ruby methods you need to extend the Dry::Core::Deprecations module with a tag that will be displayed in the output. For example:

+});

Deprecations

To deprecate ruby methods you need to extend the Dry::Core::Deprecations module with a tag that will be displayed in the output. For example:

require 'dry/core/deprecations'
 
 class Foo
diff --git a/gems/dry-core/0.7/deprecations/index.html.gz b/gems/dry-core/0.7/deprecations/index.html.gz
index f28713daeb..e3160a4647 100644
Binary files a/gems/dry-core/0.7/deprecations/index.html.gz and b/gems/dry-core/0.7/deprecations/index.html.gz differ
diff --git a/gems/dry-core/0.7/extensions/index.html b/gems/dry-core/0.7/extensions/index.html
index 60cb0158d5..fa28ba08c3 100644
--- a/gems/dry-core/0.7/extensions/index.html
+++ b/gems/dry-core/0.7/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

Define extensions that can be later enabled by the user.

+});

Extensions

Define extensions that can be later enabled by the user.

require 'dry/core/extensions'
 
 class Foo
diff --git a/gems/dry-core/0.7/extensions/index.html.gz b/gems/dry-core/0.7/extensions/index.html.gz
index 358af07a71..2ccd98c942 100644
Binary files a/gems/dry-core/0.7/extensions/index.html.gz and b/gems/dry-core/0.7/extensions/index.html.gz differ
diff --git a/gems/dry-core/0.7/index.html b/gems/dry-core/0.7/index.html
index 38399afdc9..b11909a073 100644
--- a/gems/dry-core/0.7/index.html
+++ b/gems/dry-core/0.7/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-core is a simple toolset that can be used in many places.

+});

Cache

Allows you to cache call results that are solely determined by arguments.

+});

Cache

Allows you to cache call results that are solely determined by arguments.

require 'dry/core/cache'
 
 class Foo
diff --git a/gems/dry-core/0.8/cache/index.html.gz b/gems/dry-core/0.8/cache/index.html.gz
index 5c4086f496..ddf6d3cc7d 100644
Binary files a/gems/dry-core/0.8/cache/index.html.gz and b/gems/dry-core/0.8/cache/index.html.gz differ
diff --git a/gems/dry-core/0.8/classes/class-attributes/index.html b/gems/dry-core/0.8/classes/class-attributes/index.html
index ab65b34592..52b9fd32a7 100644
--- a/gems/dry-core/0.8/classes/class-attributes/index.html
+++ b/gems/dry-core/0.8/classes/class-attributes/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class Attributes

require 'dry/core/class_attributes'
+});

Class Attributes

require 'dry/core/class_attributes'
 
 class ExtraClass
   extend Dry::Core::ClassAttributes
diff --git a/gems/dry-core/0.8/classes/class-attributes/index.html.gz b/gems/dry-core/0.8/classes/class-attributes/index.html.gz
index f78f4c22df..0ee4a66468 100644
Binary files a/gems/dry-core/0.8/classes/class-attributes/index.html.gz and b/gems/dry-core/0.8/classes/class-attributes/index.html.gz differ
diff --git a/gems/dry-core/0.8/classes/class-builder/index.html b/gems/dry-core/0.8/classes/class-builder/index.html
index f1c8762320..d12b7399bd 100644
--- a/gems/dry-core/0.8/classes/class-builder/index.html
+++ b/gems/dry-core/0.8/classes/class-builder/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class Builder

require 'dry/core/class_builder'
+});

Class Builder

require 'dry/core/class_builder'
 
 builder = Dry::Core::ClassBuilder.new(name: 'MyClass')
 
diff --git a/gems/dry-core/0.8/classes/class-builder/index.html.gz b/gems/dry-core/0.8/classes/class-builder/index.html.gz
index d280f6d286..11aed3083a 100644
Binary files a/gems/dry-core/0.8/classes/class-builder/index.html.gz and b/gems/dry-core/0.8/classes/class-builder/index.html.gz differ
diff --git a/gems/dry-core/0.8/classes/index.html b/gems/dry-core/0.8/classes/index.html
index 14d777a1ce..ed94c273ac 100644
--- a/gems/dry-core/0.8/classes/index.html
+++ b/gems/dry-core/0.8/classes/index.html
@@ -3,5 +3,5 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});
\ No newline at end of file diff --git a/gems/dry-core/0.8/classes/index.html.gz b/gems/dry-core/0.8/classes/index.html.gz index 6d7e8d4b5b..5ad0e274c0 100644 Binary files a/gems/dry-core/0.8/classes/index.html.gz and b/gems/dry-core/0.8/classes/index.html.gz differ diff --git a/gems/dry-core/0.8/constants/index.html b/gems/dry-core/0.8/constants/index.html index c43a8ba538..d99923b07b 100644 --- a/gems/dry-core/0.8/constants/index.html +++ b/gems/dry-core/0.8/constants/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Constants

A list of constants you can use to avoid memory allocations or identity checks.

+});

Constants

A list of constants you can use to avoid memory allocations or identity checks.

  • EMPTY_ARRAY
  • diff --git a/gems/dry-core/0.8/constants/index.html.gz b/gems/dry-core/0.8/constants/index.html.gz index fb565ebbf6..11a7b7e6da 100644 Binary files a/gems/dry-core/0.8/constants/index.html.gz and b/gems/dry-core/0.8/constants/index.html.gz differ diff --git a/gems/dry-core/0.8/deprecations/index.html b/gems/dry-core/0.8/deprecations/index.html index d8976cf6c1..4a5b59f739 100644 --- a/gems/dry-core/0.8/deprecations/index.html +++ b/gems/dry-core/0.8/deprecations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Deprecations

To deprecate ruby methods you need to extend the Dry::Core::Deprecations module with a tag that will be displayed in the output. For example:

+});

Deprecations

To deprecate ruby methods you need to extend the Dry::Core::Deprecations module with a tag that will be displayed in the output. For example:

require 'dry/core/deprecations'
 
 class Foo
diff --git a/gems/dry-core/0.8/deprecations/index.html.gz b/gems/dry-core/0.8/deprecations/index.html.gz
index 6d6fbae5b2..d988a0fa00 100644
Binary files a/gems/dry-core/0.8/deprecations/index.html.gz and b/gems/dry-core/0.8/deprecations/index.html.gz differ
diff --git a/gems/dry-core/0.8/equalizer/index.html b/gems/dry-core/0.8/equalizer/index.html
index a48f6d416e..b150b2dd3e 100644
--- a/gems/dry-core/0.8/equalizer/index.html
+++ b/gems/dry-core/0.8/equalizer/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Equalizer

A simple mixin that can be used to add instance variable based equality, equivalence and inspection methods to your objects.

+});

Extensions

Define extensions that can be later enabled by the user.

+});

Extensions

Define extensions that can be later enabled by the user.

require 'dry/core/extensions'
 
 class Foo
diff --git a/gems/dry-core/0.8/extensions/index.html.gz b/gems/dry-core/0.8/extensions/index.html.gz
index 95bb7420bb..2be715847a 100644
Binary files a/gems/dry-core/0.8/extensions/index.html.gz and b/gems/dry-core/0.8/extensions/index.html.gz differ
diff --git a/gems/dry-core/0.8/index.html b/gems/dry-core/0.8/index.html
index 13b0d37d47..21a27781c4 100644
--- a/gems/dry-core/0.8/index.html
+++ b/gems/dry-core/0.8/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-core is a simple toolset that can be used in many places.

+});

Cache

Allows you to cache call results that are solely determined by arguments.

+});

Cache

Allows you to cache call results that are solely determined by arguments.

require 'dry/core/cache'
 
 class Foo
diff --git a/gems/dry-core/0.9/cache/index.html.gz b/gems/dry-core/0.9/cache/index.html.gz
index 51bbb8b997..a8b0863b96 100644
Binary files a/gems/dry-core/0.9/cache/index.html.gz and b/gems/dry-core/0.9/cache/index.html.gz differ
diff --git a/gems/dry-core/0.9/classes/class-attributes/index.html b/gems/dry-core/0.9/classes/class-attributes/index.html
index 8ccd4912d6..9c9443469a 100644
--- a/gems/dry-core/0.9/classes/class-attributes/index.html
+++ b/gems/dry-core/0.9/classes/class-attributes/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class Attributes

require 'dry/core/class_attributes'
+});

Class Attributes

require 'dry/core/class_attributes'
 
 class ExtraClass
   extend Dry::Core::ClassAttributes
diff --git a/gems/dry-core/0.9/classes/class-attributes/index.html.gz b/gems/dry-core/0.9/classes/class-attributes/index.html.gz
index b2a9ac9841..1ef09e1158 100644
Binary files a/gems/dry-core/0.9/classes/class-attributes/index.html.gz and b/gems/dry-core/0.9/classes/class-attributes/index.html.gz differ
diff --git a/gems/dry-core/0.9/classes/class-builder/index.html b/gems/dry-core/0.9/classes/class-builder/index.html
index 8384e6940b..e05c23162f 100644
--- a/gems/dry-core/0.9/classes/class-builder/index.html
+++ b/gems/dry-core/0.9/classes/class-builder/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class Builder

require 'dry/core/class_builder'
+});

Class Builder

require 'dry/core/class_builder'
 
 builder = Dry::Core::ClassBuilder.new(name: 'MyClass')
 
diff --git a/gems/dry-core/0.9/classes/class-builder/index.html.gz b/gems/dry-core/0.9/classes/class-builder/index.html.gz
index 471a48eab1..9b6cf4fe69 100644
Binary files a/gems/dry-core/0.9/classes/class-builder/index.html.gz and b/gems/dry-core/0.9/classes/class-builder/index.html.gz differ
diff --git a/gems/dry-core/0.9/classes/index.html b/gems/dry-core/0.9/classes/index.html
index f2cf8a0ba1..80f907d7f8 100644
--- a/gems/dry-core/0.9/classes/index.html
+++ b/gems/dry-core/0.9/classes/index.html
@@ -3,5 +3,5 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});
\ No newline at end of file diff --git a/gems/dry-core/0.9/classes/index.html.gz b/gems/dry-core/0.9/classes/index.html.gz index 87d281e345..6415819c60 100644 Binary files a/gems/dry-core/0.9/classes/index.html.gz and b/gems/dry-core/0.9/classes/index.html.gz differ diff --git a/gems/dry-core/0.9/constants/index.html b/gems/dry-core/0.9/constants/index.html index 5faa20f1b4..c3466a8966 100644 --- a/gems/dry-core/0.9/constants/index.html +++ b/gems/dry-core/0.9/constants/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Constants

A list of constants you can use to avoid memory allocations or identity checks.

+});

Constants

A list of constants you can use to avoid memory allocations or identity checks.

  • EMPTY_ARRAY
  • diff --git a/gems/dry-core/0.9/constants/index.html.gz b/gems/dry-core/0.9/constants/index.html.gz index 314e570531..c2d327b611 100644 Binary files a/gems/dry-core/0.9/constants/index.html.gz and b/gems/dry-core/0.9/constants/index.html.gz differ diff --git a/gems/dry-core/0.9/deprecations/index.html b/gems/dry-core/0.9/deprecations/index.html index 82d94ee7ae..7bbb70b117 100644 --- a/gems/dry-core/0.9/deprecations/index.html +++ b/gems/dry-core/0.9/deprecations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Deprecations

To deprecate ruby methods you need to extend the Dry::Core::Deprecations module with a tag that will be displayed in the output. For example:

+});

Deprecations

To deprecate ruby methods you need to extend the Dry::Core::Deprecations module with a tag that will be displayed in the output. For example:

require 'dry/core/deprecations'
 
 class Foo
diff --git a/gems/dry-core/0.9/deprecations/index.html.gz b/gems/dry-core/0.9/deprecations/index.html.gz
index d134bb67d5..2dc967bee1 100644
Binary files a/gems/dry-core/0.9/deprecations/index.html.gz and b/gems/dry-core/0.9/deprecations/index.html.gz differ
diff --git a/gems/dry-core/0.9/equalizer/index.html b/gems/dry-core/0.9/equalizer/index.html
index e12bc2e532..61459ba3e7 100644
--- a/gems/dry-core/0.9/equalizer/index.html
+++ b/gems/dry-core/0.9/equalizer/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Equalizer

A simple mixin that can be used to add instance variable based equality, equivalence and inspection methods to your objects.

+});

Extensions

Define extensions that can be later enabled by the user.

+});

Extensions

Define extensions that can be later enabled by the user.

require 'dry/core/extensions'
 
 class Foo
diff --git a/gems/dry-core/0.9/extensions/index.html.gz b/gems/dry-core/0.9/extensions/index.html.gz
index 33098816b0..10dc1479c7 100644
Binary files a/gems/dry-core/0.9/extensions/index.html.gz and b/gems/dry-core/0.9/extensions/index.html.gz differ
diff --git a/gems/dry-core/0.9/index.html b/gems/dry-core/0.9/index.html
index 6bfdae8348..a04df6c194 100644
--- a/gems/dry-core/0.9/index.html
+++ b/gems/dry-core/0.9/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-core is a simple toolset that can be used in many places.

+});

Cache

Allows you to cache call results that are solely determined by arguments.

+});

Cache

Allows you to cache call results that are solely determined by arguments.

require "dry/core"
 
 class Foo
diff --git a/gems/dry-core/1.0/cache/index.html.gz b/gems/dry-core/1.0/cache/index.html.gz
index 2ee50cafc4..36eea9a5cc 100644
Binary files a/gems/dry-core/1.0/cache/index.html.gz and b/gems/dry-core/1.0/cache/index.html.gz differ
diff --git a/gems/dry-core/1.0/classes/class-attributes/index.html b/gems/dry-core/1.0/classes/class-attributes/index.html
index 6fd1d8027b..fe70e3a1d4 100644
--- a/gems/dry-core/1.0/classes/class-attributes/index.html
+++ b/gems/dry-core/1.0/classes/class-attributes/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class Attributes

require 'dry/core/class_attributes'
+});

Class Attributes

require 'dry/core/class_attributes'
 
 class ExtraClass
   extend Dry::Core::ClassAttributes
diff --git a/gems/dry-core/1.0/classes/class-attributes/index.html.gz b/gems/dry-core/1.0/classes/class-attributes/index.html.gz
index 5ec29a72b3..058ee53cdf 100644
Binary files a/gems/dry-core/1.0/classes/class-attributes/index.html.gz and b/gems/dry-core/1.0/classes/class-attributes/index.html.gz differ
diff --git a/gems/dry-core/1.0/classes/class-builder/index.html b/gems/dry-core/1.0/classes/class-builder/index.html
index a90173826f..ccc39b7ea9 100644
--- a/gems/dry-core/1.0/classes/class-builder/index.html
+++ b/gems/dry-core/1.0/classes/class-builder/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class Builder

require 'dry/core/class_builder'
+});

Class Builder

require 'dry/core/class_builder'
 
 builder = Dry::Core::ClassBuilder.new(name: 'MyClass')
 
diff --git a/gems/dry-core/1.0/classes/class-builder/index.html.gz b/gems/dry-core/1.0/classes/class-builder/index.html.gz
index a85f3dded4..9545098113 100644
Binary files a/gems/dry-core/1.0/classes/class-builder/index.html.gz and b/gems/dry-core/1.0/classes/class-builder/index.html.gz differ
diff --git a/gems/dry-core/1.0/classes/index.html b/gems/dry-core/1.0/classes/index.html
index 25832ed3cc..9e9dd4f09c 100644
--- a/gems/dry-core/1.0/classes/index.html
+++ b/gems/dry-core/1.0/classes/index.html
@@ -3,5 +3,5 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});
\ No newline at end of file diff --git a/gems/dry-core/1.0/classes/index.html.gz b/gems/dry-core/1.0/classes/index.html.gz index 85cf9ed2fe..033aa14bc4 100644 Binary files a/gems/dry-core/1.0/classes/index.html.gz and b/gems/dry-core/1.0/classes/index.html.gz differ diff --git a/gems/dry-core/1.0/constants/index.html b/gems/dry-core/1.0/constants/index.html index dc702282b2..05b53bfac7 100644 --- a/gems/dry-core/1.0/constants/index.html +++ b/gems/dry-core/1.0/constants/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Constants

A list of constants you can use to avoid memory allocations or identity checks.

+});

Constants

A list of constants you can use to avoid memory allocations or identity checks.

  • EMPTY_ARRAY
  • diff --git a/gems/dry-core/1.0/constants/index.html.gz b/gems/dry-core/1.0/constants/index.html.gz index c71fdc280d..6f3e4417ac 100644 Binary files a/gems/dry-core/1.0/constants/index.html.gz and b/gems/dry-core/1.0/constants/index.html.gz differ diff --git a/gems/dry-core/1.0/deprecations/index.html b/gems/dry-core/1.0/deprecations/index.html index 4e6fcddd12..238c80126a 100644 --- a/gems/dry-core/1.0/deprecations/index.html +++ b/gems/dry-core/1.0/deprecations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Deprecations

To deprecate ruby methods you need to extend the Dry::Core::Deprecations module with a tag that will be displayed in the output. For example:

+});

Deprecations

To deprecate ruby methods you need to extend the Dry::Core::Deprecations module with a tag that will be displayed in the output. For example:

require "dry/core"
 
 class Foo
diff --git a/gems/dry-core/1.0/deprecations/index.html.gz b/gems/dry-core/1.0/deprecations/index.html.gz
index 4703fb10b9..3c9b691803 100644
Binary files a/gems/dry-core/1.0/deprecations/index.html.gz and b/gems/dry-core/1.0/deprecations/index.html.gz differ
diff --git a/gems/dry-core/1.0/equalizer/index.html b/gems/dry-core/1.0/equalizer/index.html
index f2e86550f0..fad49e2d79 100644
--- a/gems/dry-core/1.0/equalizer/index.html
+++ b/gems/dry-core/1.0/equalizer/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Equalizer

A simple mixin that can be used to add instance variable based equality, equivalence and inspection methods to your objects.

+});

Extensions

Define extensions that can be later enabled by the user.

+});

Extensions

Define extensions that can be later enabled by the user.

require "dry/core"
 
 class Foo
diff --git a/gems/dry-core/1.0/extensions/index.html.gz b/gems/dry-core/1.0/extensions/index.html.gz
index 9957cd577d..23815fee38 100644
Binary files a/gems/dry-core/1.0/extensions/index.html.gz and b/gems/dry-core/1.0/extensions/index.html.gz differ
diff --git a/gems/dry-core/1.0/index.html b/gems/dry-core/1.0/index.html
index 7c1790e243..b20aca823e 100644
--- a/gems/dry-core/1.0/index.html
+++ b/gems/dry-core/1.0/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-core is a simple toolset that can be used in many places.

+});

Cache

Allows you to cache call results that are solely determined by arguments.

+});

Cache

Allows you to cache call results that are solely determined by arguments.

require "dry/core"
 
 class Foo
diff --git a/gems/dry-core/main/cache/index.html.gz b/gems/dry-core/main/cache/index.html.gz
index 88ec6e2e12..8d858ddb6b 100644
Binary files a/gems/dry-core/main/cache/index.html.gz and b/gems/dry-core/main/cache/index.html.gz differ
diff --git a/gems/dry-core/main/classes/class-attributes/index.html b/gems/dry-core/main/classes/class-attributes/index.html
index fe16f44829..f0401263a8 100644
--- a/gems/dry-core/main/classes/class-attributes/index.html
+++ b/gems/dry-core/main/classes/class-attributes/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class Attributes

require 'dry/core/class_attributes'
+});

Class Attributes

require 'dry/core/class_attributes'
 
 class ExtraClass
   extend Dry::Core::ClassAttributes
diff --git a/gems/dry-core/main/classes/class-attributes/index.html.gz b/gems/dry-core/main/classes/class-attributes/index.html.gz
index 0b24915b0f..3114e63d64 100644
Binary files a/gems/dry-core/main/classes/class-attributes/index.html.gz and b/gems/dry-core/main/classes/class-attributes/index.html.gz differ
diff --git a/gems/dry-core/main/classes/class-builder/index.html b/gems/dry-core/main/classes/class-builder/index.html
index 7f465e4544..77b3a0bd0b 100644
--- a/gems/dry-core/main/classes/class-builder/index.html
+++ b/gems/dry-core/main/classes/class-builder/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class Builder

require 'dry/core/class_builder'
+});

Class Builder

require 'dry/core/class_builder'
 
 builder = Dry::Core::ClassBuilder.new(name: 'MyClass')
 
diff --git a/gems/dry-core/main/classes/class-builder/index.html.gz b/gems/dry-core/main/classes/class-builder/index.html.gz
index 0b8b6283f1..479b8ba573 100644
Binary files a/gems/dry-core/main/classes/class-builder/index.html.gz and b/gems/dry-core/main/classes/class-builder/index.html.gz differ
diff --git a/gems/dry-core/main/classes/index.html b/gems/dry-core/main/classes/index.html
index 95fd855a2a..83951727d5 100644
--- a/gems/dry-core/main/classes/index.html
+++ b/gems/dry-core/main/classes/index.html
@@ -3,5 +3,5 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});
\ No newline at end of file diff --git a/gems/dry-core/main/classes/index.html.gz b/gems/dry-core/main/classes/index.html.gz index 88b9ca51fe..bc800bf8c6 100644 Binary files a/gems/dry-core/main/classes/index.html.gz and b/gems/dry-core/main/classes/index.html.gz differ diff --git a/gems/dry-core/main/constants/index.html b/gems/dry-core/main/constants/index.html index d728ade3b6..4d9107f6ca 100644 --- a/gems/dry-core/main/constants/index.html +++ b/gems/dry-core/main/constants/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Constants

A list of constants you can use to avoid memory allocations or identity checks.

+});

Constants

A list of constants you can use to avoid memory allocations or identity checks.

  • EMPTY_ARRAY
  • diff --git a/gems/dry-core/main/constants/index.html.gz b/gems/dry-core/main/constants/index.html.gz index 217d660017..7010ada114 100644 Binary files a/gems/dry-core/main/constants/index.html.gz and b/gems/dry-core/main/constants/index.html.gz differ diff --git a/gems/dry-core/main/deprecations/index.html b/gems/dry-core/main/deprecations/index.html index 9dbfa3331b..029da1fa18 100644 --- a/gems/dry-core/main/deprecations/index.html +++ b/gems/dry-core/main/deprecations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Deprecations

To deprecate ruby methods you need to extend the Dry::Core::Deprecations module with a tag that will be displayed in the output. For example:

+});

Deprecations

To deprecate ruby methods you need to extend the Dry::Core::Deprecations module with a tag that will be displayed in the output. For example:

require "dry/core"
 
 class Foo
diff --git a/gems/dry-core/main/deprecations/index.html.gz b/gems/dry-core/main/deprecations/index.html.gz
index 5d2b249fdc..ab381ea86c 100644
Binary files a/gems/dry-core/main/deprecations/index.html.gz and b/gems/dry-core/main/deprecations/index.html.gz differ
diff --git a/gems/dry-core/main/equalizer/index.html b/gems/dry-core/main/equalizer/index.html
index a142156a4f..8353cbb4e1 100644
--- a/gems/dry-core/main/equalizer/index.html
+++ b/gems/dry-core/main/equalizer/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Equalizer

A simple mixin that can be used to add instance variable based equality, equivalence and inspection methods to your objects.

+});

Extensions

Define extensions that can be later enabled by the user.

+});

Extensions

Define extensions that can be later enabled by the user.

require "dry/core"
 
 class Foo
diff --git a/gems/dry-core/main/extensions/index.html.gz b/gems/dry-core/main/extensions/index.html.gz
index 4b80f75c88..134e7e9de8 100644
Binary files a/gems/dry-core/main/extensions/index.html.gz and b/gems/dry-core/main/extensions/index.html.gz differ
diff --git a/gems/dry-core/main/index.html b/gems/dry-core/main/index.html
index 582a1224ab..259936d72e 100644
--- a/gems/dry-core/main/index.html
+++ b/gems/dry-core/main/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-core is a simple toolset that can be used in many places.

+});

Cache

Cache provides two interfaces for caching. Set up a handler:

require 'dry/effects'
 
 class CacheMiddleware
diff --git a/gems/dry-effects/0.1/effects/cache/index.html.gz b/gems/dry-effects/0.1/effects/cache/index.html.gz
index a4c7ba88a2..786262d922 100644
Binary files a/gems/dry-effects/0.1/effects/cache/index.html.gz and b/gems/dry-effects/0.1/effects/cache/index.html.gz differ
diff --git a/gems/dry-effects/0.1/effects/current_time/index.html b/gems/dry-effects/0.1/effects/current_time/index.html
index 215e6fb129..36314be349 100644
--- a/gems/dry-effects/0.1/effects/current_time/index.html
+++ b/gems/dry-effects/0.1/effects/current_time/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Current Time

Obtaining the current time with Time.now is a classic example of a side effect. Code relying on accessing system time is harder to test. One possible solution is passing time around explicitly, but using effects can save you some typing depending on the case.

+});

Current Time

Obtaining the current time with Time.now is a classic example of a side effect. Code relying on accessing system time is harder to test. One possible solution is passing time around explicitly, but using effects can save you some typing depending on the case.

Providing and obtaining the current time is straightforward:

require 'dry/effects'
diff --git a/gems/dry-effects/0.1/effects/current_time/index.html.gz b/gems/dry-effects/0.1/effects/current_time/index.html.gz
index 7bfb50020c..f246f11411 100644
Binary files a/gems/dry-effects/0.1/effects/current_time/index.html.gz and b/gems/dry-effects/0.1/effects/current_time/index.html.gz differ
diff --git a/gems/dry-effects/0.1/effects/defer/index.html b/gems/dry-effects/0.1/effects/defer/index.html
index c19d0fa1b2..4e960c4690 100644
--- a/gems/dry-effects/0.1/effects/defer/index.html
+++ b/gems/dry-effects/0.1/effects/defer/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Deferred execution

Defer adds three methods for working with deferred code execution:

+});

Deferred execution

Defer adds three methods for working with deferred code execution:

  • defer accepts a block and executes it (potentially) on a thread pool. It returns an object that can be awaited with wait. These objects are Promises made by concurrent-ruby. You can use their API, but it's not fully supported and tested in conjunction with effects.
  • diff --git a/gems/dry-effects/0.1/effects/defer/index.html.gz b/gems/dry-effects/0.1/effects/defer/index.html.gz index 8c7901b708..bee6e09f38 100644 Binary files a/gems/dry-effects/0.1/effects/defer/index.html.gz and b/gems/dry-effects/0.1/effects/defer/index.html.gz differ diff --git a/gems/dry-effects/0.1/effects/env/index.html b/gems/dry-effects/0.1/effects/env/index.html index 8f19c933ff..968a61d1f3 100644 --- a/gems/dry-effects/0.1/effects/env/index.html +++ b/gems/dry-effects/0.1/effects/env/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Environment

Configuring code via ENV can be handy, but testing it by mutating a global constant is usually not. Env is similar to Reader but exists for passing simple key-value pairs, precisely what ENV does.

+});

Effects

dry-effects has a bunch of built-in effects and providers:

  • Reader
  • diff --git a/gems/dry-effects/0.1/effects/index.html.gz b/gems/dry-effects/0.1/effects/index.html.gz index 783adc28eb..84c7cb81f4 100644 Binary files a/gems/dry-effects/0.1/effects/index.html.gz and b/gems/dry-effects/0.1/effects/index.html.gz differ diff --git a/gems/dry-effects/0.1/effects/interrupt/index.html b/gems/dry-effects/0.1/effects/interrupt/index.html index 66b0a199b5..27514e033e 100644 --- a/gems/dry-effects/0.1/effects/interrupt/index.html +++ b/gems/dry-effects/0.1/effects/interrupt/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Interrupt

Interrupt is an effect with the semantics of raise/rescue or throw/catch. It's added for consistency and compatibility with other effects. Underneath, it uses raise + rescue so that application code can detect the bubbling.

+});

Parallel execution

There are two effects for using parallelism:

  • par creates a unit of parallel execution;
  • diff --git a/gems/dry-effects/0.1/effects/parallel/index.html.gz b/gems/dry-effects/0.1/effects/parallel/index.html.gz index b3091c85cd..f3bc693b9c 100644 Binary files a/gems/dry-effects/0.1/effects/parallel/index.html.gz and b/gems/dry-effects/0.1/effects/parallel/index.html.gz differ diff --git a/gems/dry-effects/0.1/effects/reader/index.html b/gems/dry-effects/0.1/effects/reader/index.html index c98c686f67..61909d8aca 100644 --- a/gems/dry-effects/0.1/effects/reader/index.html +++ b/gems/dry-effects/0.1/effects/reader/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Reader

Reader is the simplest effect. It passes a value down to the stack.

+});

Reader

Reader is the simplest effect. It passes a value down to the stack.

require 'dry-effects'
 
 class SetLocaleMiddleware
diff --git a/gems/dry-effects/0.1/effects/reader/index.html.gz b/gems/dry-effects/0.1/effects/reader/index.html.gz
index 9de7356b73..f599d42572 100644
Binary files a/gems/dry-effects/0.1/effects/reader/index.html.gz and b/gems/dry-effects/0.1/effects/reader/index.html.gz differ
diff --git a/gems/dry-effects/0.1/effects/resolve/index.html b/gems/dry-effects/0.1/effects/resolve/index.html
index a6dbe4ee56..39484a6828 100644
--- a/gems/dry-effects/0.1/effects/resolve/index.html
+++ b/gems/dry-effects/0.1/effects/resolve/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Resolve (Dependency Injection)

Resolve is an effect for injecting dependencies. A simple usage example:

+});

Resolve (Dependency Injection)

Resolve is an effect for injecting dependencies. A simple usage example:

require 'dry/effects'
 
 class CreateUser
diff --git a/gems/dry-effects/0.1/effects/resolve/index.html.gz b/gems/dry-effects/0.1/effects/resolve/index.html.gz
index 7d07c2bbe1..237c92a7af 100644
Binary files a/gems/dry-effects/0.1/effects/resolve/index.html.gz and b/gems/dry-effects/0.1/effects/resolve/index.html.gz differ
diff --git a/gems/dry-effects/0.1/effects/state/index.html b/gems/dry-effects/0.1/effects/state/index.html
index 62a48d97a9..2ba63a6989 100644
--- a/gems/dry-effects/0.1/effects/state/index.html
+++ b/gems/dry-effects/0.1/effects/state/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

State

State is a mutation effect. It allows reading and writing non-local values.

+});

Timeout

Timeout consists of two methods:

  • timeout returns an ever-decreasing number of seconds until this number reaches 0.
  • diff --git a/gems/dry-effects/0.1/effects/timeout/index.html.gz b/gems/dry-effects/0.1/effects/timeout/index.html.gz index 4b0432cc15..af74a3c6d0 100644 Binary files a/gems/dry-effects/0.1/effects/timeout/index.html.gz and b/gems/dry-effects/0.1/effects/timeout/index.html.gz differ diff --git a/gems/dry-effects/0.1/index.html b/gems/dry-effects/0.1/index.html index b00a35764b..232efd9985 100644 --- a/gems/dry-effects/0.1/index.html +++ b/gems/dry-effects/0.1/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-effects is a practical, production-oriented implementation of algebraic effects in Ruby.

+});

Cache

Cache provides two interfaces for caching. Set up a handler:

require 'dry/effects'
 
 class CacheMiddleware
diff --git a/gems/dry-effects/0.2/effects/cache/index.html.gz b/gems/dry-effects/0.2/effects/cache/index.html.gz
index c952e050e0..3acdaf1a8d 100644
Binary files a/gems/dry-effects/0.2/effects/cache/index.html.gz and b/gems/dry-effects/0.2/effects/cache/index.html.gz differ
diff --git a/gems/dry-effects/0.2/effects/current_time/index.html b/gems/dry-effects/0.2/effects/current_time/index.html
index f6cf0c27b9..93e3c45f08 100644
--- a/gems/dry-effects/0.2/effects/current_time/index.html
+++ b/gems/dry-effects/0.2/effects/current_time/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Current Time

Obtaining the current time with Time.now is a classic example of a side effect. Code relying on accessing system time is harder to test. One possible solution is passing time around explicitly, but using effects can save you some typing depending on the case.

+});

Current Time

Obtaining the current time with Time.now is a classic example of a side effect. Code relying on accessing system time is harder to test. One possible solution is passing time around explicitly, but using effects can save you some typing depending on the case.

Providing and obtaining the current time is straightforward:

require 'dry/effects'
diff --git a/gems/dry-effects/0.2/effects/current_time/index.html.gz b/gems/dry-effects/0.2/effects/current_time/index.html.gz
index 5400035e82..65456862e9 100644
Binary files a/gems/dry-effects/0.2/effects/current_time/index.html.gz and b/gems/dry-effects/0.2/effects/current_time/index.html.gz differ
diff --git a/gems/dry-effects/0.2/effects/defer/index.html b/gems/dry-effects/0.2/effects/defer/index.html
index d1496dc964..3a1b620511 100644
--- a/gems/dry-effects/0.2/effects/defer/index.html
+++ b/gems/dry-effects/0.2/effects/defer/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Deferred execution

Defer adds three methods for working with deferred code execution:

+});

Deferred execution

Defer adds three methods for working with deferred code execution:

  • defer accepts a block and executes it (potentially) on a thread pool. It returns an object that can be awaited with wait. These objects are Promises made by concurrent-ruby. You can use their API, but it's not fully supported and tested in conjunction with effects.
  • diff --git a/gems/dry-effects/0.2/effects/defer/index.html.gz b/gems/dry-effects/0.2/effects/defer/index.html.gz index a4f85924e8..e9edac3ea6 100644 Binary files a/gems/dry-effects/0.2/effects/defer/index.html.gz and b/gems/dry-effects/0.2/effects/defer/index.html.gz differ diff --git a/gems/dry-effects/0.2/effects/env/index.html b/gems/dry-effects/0.2/effects/env/index.html index 2bd7bbc1b4..f3910ced8f 100644 --- a/gems/dry-effects/0.2/effects/env/index.html +++ b/gems/dry-effects/0.2/effects/env/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Environment

Configuring code via ENV can be handy, but testing it by mutating a global constant is usually not. Env is similar to Reader but exists for passing simple key-value pairs, precisely what ENV does.

+});

Effects

dry-effects has a bunch of built-in effects and providers:

  • Reader
  • diff --git a/gems/dry-effects/0.2/effects/index.html.gz b/gems/dry-effects/0.2/effects/index.html.gz index 018710f471..dbe740ed2b 100644 Binary files a/gems/dry-effects/0.2/effects/index.html.gz and b/gems/dry-effects/0.2/effects/index.html.gz differ diff --git a/gems/dry-effects/0.2/effects/interrupt/index.html b/gems/dry-effects/0.2/effects/interrupt/index.html index f614a82ea9..c132981d32 100644 --- a/gems/dry-effects/0.2/effects/interrupt/index.html +++ b/gems/dry-effects/0.2/effects/interrupt/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Interrupt

Interrupt is an effect with the semantics of raise/rescue or throw/catch. It's added for consistency and compatibility with other effects. Underneath, it uses raise + rescue so that application code can detect the bubbling.

+});

Parallel execution

There are two effects for using parallelism:

  • par creates a unit of parallel execution;
  • diff --git a/gems/dry-effects/0.2/effects/parallel/index.html.gz b/gems/dry-effects/0.2/effects/parallel/index.html.gz index 1b7edf018a..13f9e27ee7 100644 Binary files a/gems/dry-effects/0.2/effects/parallel/index.html.gz and b/gems/dry-effects/0.2/effects/parallel/index.html.gz differ diff --git a/gems/dry-effects/0.2/effects/reader/index.html b/gems/dry-effects/0.2/effects/reader/index.html index 138e06a8cb..0b31c68531 100644 --- a/gems/dry-effects/0.2/effects/reader/index.html +++ b/gems/dry-effects/0.2/effects/reader/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Reader

Reader is the simplest effect. It passes a value down to the stack.

+});

Reader

Reader is the simplest effect. It passes a value down to the stack.

require 'dry/effects'
 
 class SetLocaleMiddleware
diff --git a/gems/dry-effects/0.2/effects/reader/index.html.gz b/gems/dry-effects/0.2/effects/reader/index.html.gz
index a1942b87d2..9cc1c2d37f 100644
Binary files a/gems/dry-effects/0.2/effects/reader/index.html.gz and b/gems/dry-effects/0.2/effects/reader/index.html.gz differ
diff --git a/gems/dry-effects/0.2/effects/resolve/index.html b/gems/dry-effects/0.2/effects/resolve/index.html
index d68ab57c7b..a7b4ce5d0f 100644
--- a/gems/dry-effects/0.2/effects/resolve/index.html
+++ b/gems/dry-effects/0.2/effects/resolve/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Resolve (Dependency Injection)

Resolve is an effect for injecting dependencies. A simple usage example:

+});

Resolve (Dependency Injection)

Resolve is an effect for injecting dependencies. A simple usage example:

require 'dry/effects'
 
 class CreateUser
diff --git a/gems/dry-effects/0.2/effects/resolve/index.html.gz b/gems/dry-effects/0.2/effects/resolve/index.html.gz
index 6e0cd6cbed..197c79e619 100644
Binary files a/gems/dry-effects/0.2/effects/resolve/index.html.gz and b/gems/dry-effects/0.2/effects/resolve/index.html.gz differ
diff --git a/gems/dry-effects/0.2/effects/state/index.html b/gems/dry-effects/0.2/effects/state/index.html
index f055b4bc65..e4d2284850 100644
--- a/gems/dry-effects/0.2/effects/state/index.html
+++ b/gems/dry-effects/0.2/effects/state/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

State

State is a mutation effect. It allows reading and writing non-local values.

+});

Timeout

Timeout consists of two methods:

  • timeout returns an ever-decreasing number of seconds until this number reaches 0.
  • diff --git a/gems/dry-effects/0.2/effects/timeout/index.html.gz b/gems/dry-effects/0.2/effects/timeout/index.html.gz index 545b8ac5eb..4827749770 100644 Binary files a/gems/dry-effects/0.2/effects/timeout/index.html.gz and b/gems/dry-effects/0.2/effects/timeout/index.html.gz differ diff --git a/gems/dry-effects/0.2/index.html b/gems/dry-effects/0.2/index.html index 6419c7dfb7..246de66c58 100644 --- a/gems/dry-effects/0.2/index.html +++ b/gems/dry-effects/0.2/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-effects is a practical, production-oriented implementation of algebraic effects in Ruby.

+});

Cache

Cache provides two interfaces for caching. Set up a handler:

require 'dry/effects'
 
 class CacheMiddleware
diff --git a/gems/dry-effects/0.3/effects/cache/index.html.gz b/gems/dry-effects/0.3/effects/cache/index.html.gz
index 9d03aa1d6a..be338ffd32 100644
Binary files a/gems/dry-effects/0.3/effects/cache/index.html.gz and b/gems/dry-effects/0.3/effects/cache/index.html.gz differ
diff --git a/gems/dry-effects/0.3/effects/current_time/index.html b/gems/dry-effects/0.3/effects/current_time/index.html
index 538359e62a..a7e6d7adc2 100644
--- a/gems/dry-effects/0.3/effects/current_time/index.html
+++ b/gems/dry-effects/0.3/effects/current_time/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Current Time

Obtaining the current time with Time.now is a classic example of a side effect. Code relying on accessing system time is harder to test. One possible solution is passing time around explicitly, but using effects can save you some typing depending on the case.

+});

Current Time

Obtaining the current time with Time.now is a classic example of a side effect. Code relying on accessing system time is harder to test. One possible solution is passing time around explicitly, but using effects can save you some typing depending on the case.

Providing and obtaining the current time is straightforward:

require 'dry/effects'
diff --git a/gems/dry-effects/0.3/effects/current_time/index.html.gz b/gems/dry-effects/0.3/effects/current_time/index.html.gz
index c4cd076bb0..49b6f0e79e 100644
Binary files a/gems/dry-effects/0.3/effects/current_time/index.html.gz and b/gems/dry-effects/0.3/effects/current_time/index.html.gz differ
diff --git a/gems/dry-effects/0.3/effects/defer/index.html b/gems/dry-effects/0.3/effects/defer/index.html
index 9be2908e51..806056d8a7 100644
--- a/gems/dry-effects/0.3/effects/defer/index.html
+++ b/gems/dry-effects/0.3/effects/defer/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Deferred execution

Defer adds three methods for working with deferred code execution:

+});

Deferred execution

Defer adds three methods for working with deferred code execution:

  • defer accepts a block and executes it (potentially) on a thread pool. It returns an object that can be awaited with wait. These objects are Promises made by concurrent-ruby. You can use their API, but it's not fully supported and tested in conjunction with effects.
  • diff --git a/gems/dry-effects/0.3/effects/defer/index.html.gz b/gems/dry-effects/0.3/effects/defer/index.html.gz index 45e52928ab..7b1770325b 100644 Binary files a/gems/dry-effects/0.3/effects/defer/index.html.gz and b/gems/dry-effects/0.3/effects/defer/index.html.gz differ diff --git a/gems/dry-effects/0.3/effects/env/index.html b/gems/dry-effects/0.3/effects/env/index.html index 3777eca4ae..df85ff4cdd 100644 --- a/gems/dry-effects/0.3/effects/env/index.html +++ b/gems/dry-effects/0.3/effects/env/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Environment

Configuring code via ENV can be handy, but testing it by mutating a global constant is usually not. Env is similar to Reader but exists for passing simple key-value pairs, precisely what ENV does.

+});

Effects

dry-effects has a bunch of built-in effects and providers:

  • Reader
  • diff --git a/gems/dry-effects/0.3/effects/index.html.gz b/gems/dry-effects/0.3/effects/index.html.gz index 2f8f85f214..9d7d6b2a8c 100644 Binary files a/gems/dry-effects/0.3/effects/index.html.gz and b/gems/dry-effects/0.3/effects/index.html.gz differ diff --git a/gems/dry-effects/0.3/effects/interrupt/index.html b/gems/dry-effects/0.3/effects/interrupt/index.html index 8141e29339..b712f8cbf6 100644 --- a/gems/dry-effects/0.3/effects/interrupt/index.html +++ b/gems/dry-effects/0.3/effects/interrupt/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Interrupt

Interrupt is an effect with the semantics of raise/rescue or throw/catch. It's added for consistency and compatibility with other effects. Underneath, it uses raise + rescue so that application code can detect the bubbling.

+});

Parallel execution

There are two effects for using parallelism:

  • par creates a unit of parallel execution;
  • diff --git a/gems/dry-effects/0.3/effects/parallel/index.html.gz b/gems/dry-effects/0.3/effects/parallel/index.html.gz index d588387ec4..1eb7d86234 100644 Binary files a/gems/dry-effects/0.3/effects/parallel/index.html.gz and b/gems/dry-effects/0.3/effects/parallel/index.html.gz differ diff --git a/gems/dry-effects/0.3/effects/reader/index.html b/gems/dry-effects/0.3/effects/reader/index.html index 6446cb29e8..c0e22f899e 100644 --- a/gems/dry-effects/0.3/effects/reader/index.html +++ b/gems/dry-effects/0.3/effects/reader/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Reader

Reader is the simplest effect. It passes a value down to the stack.

+});

Reader

Reader is the simplest effect. It passes a value down to the stack.

require 'dry/effects'
 
 class SetLocaleMiddleware
diff --git a/gems/dry-effects/0.3/effects/reader/index.html.gz b/gems/dry-effects/0.3/effects/reader/index.html.gz
index 192f154504..99e4985368 100644
Binary files a/gems/dry-effects/0.3/effects/reader/index.html.gz and b/gems/dry-effects/0.3/effects/reader/index.html.gz differ
diff --git a/gems/dry-effects/0.3/effects/resolve/index.html b/gems/dry-effects/0.3/effects/resolve/index.html
index 7ad9be2a00..4a810eda54 100644
--- a/gems/dry-effects/0.3/effects/resolve/index.html
+++ b/gems/dry-effects/0.3/effects/resolve/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Resolve (Dependency Injection)

Resolve is an effect for injecting dependencies. A simple usage example:

+});

Resolve (Dependency Injection)

Resolve is an effect for injecting dependencies. A simple usage example:

require 'dry/effects'
 
 class CreateUser
diff --git a/gems/dry-effects/0.3/effects/resolve/index.html.gz b/gems/dry-effects/0.3/effects/resolve/index.html.gz
index 355dbacc4a..a492a8dece 100644
Binary files a/gems/dry-effects/0.3/effects/resolve/index.html.gz and b/gems/dry-effects/0.3/effects/resolve/index.html.gz differ
diff --git a/gems/dry-effects/0.3/effects/state/index.html b/gems/dry-effects/0.3/effects/state/index.html
index 3ecaea68ee..b7a38eda0d 100644
--- a/gems/dry-effects/0.3/effects/state/index.html
+++ b/gems/dry-effects/0.3/effects/state/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

State

State is a mutation effect. It allows reading and writing non-local values.

+});

Timeout

Timeout consists of two methods:

  • timeout returns an ever-decreasing number of seconds until this number reaches 0.
  • diff --git a/gems/dry-effects/0.3/effects/timeout/index.html.gz b/gems/dry-effects/0.3/effects/timeout/index.html.gz index dcaec2e47d..ecc54354bf 100644 Binary files a/gems/dry-effects/0.3/effects/timeout/index.html.gz and b/gems/dry-effects/0.3/effects/timeout/index.html.gz differ diff --git a/gems/dry-effects/0.3/index.html b/gems/dry-effects/0.3/index.html index ce46e20ffb..255dd58668 100644 --- a/gems/dry-effects/0.3/index.html +++ b/gems/dry-effects/0.3/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-effects is a practical, production-oriented implementation of algebraic effects in Ruby.

+});

Cache

Cache provides two interfaces for caching. Set up a handler:

require 'dry/effects'
 
 class CacheMiddleware
diff --git a/gems/dry-effects/0.4/effects/cache/index.html.gz b/gems/dry-effects/0.4/effects/cache/index.html.gz
index 4288182173..2e59724323 100644
Binary files a/gems/dry-effects/0.4/effects/cache/index.html.gz and b/gems/dry-effects/0.4/effects/cache/index.html.gz differ
diff --git a/gems/dry-effects/0.4/effects/current_time/index.html b/gems/dry-effects/0.4/effects/current_time/index.html
index 7f19b01a90..4469805fb0 100644
--- a/gems/dry-effects/0.4/effects/current_time/index.html
+++ b/gems/dry-effects/0.4/effects/current_time/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Current Time

Obtaining the current time with Time.now is a classic example of a side effect. Code relying on accessing system time is harder to test. One possible solution is passing time around explicitly, but using effects can save you some typing depending on the case.

+});

Current Time

Obtaining the current time with Time.now is a classic example of a side effect. Code relying on accessing system time is harder to test. One possible solution is passing time around explicitly, but using effects can save you some typing depending on the case.

Providing and obtaining the current time is straightforward:

require 'dry/effects'
diff --git a/gems/dry-effects/0.4/effects/current_time/index.html.gz b/gems/dry-effects/0.4/effects/current_time/index.html.gz
index 1e4bb6ef22..f3da536151 100644
Binary files a/gems/dry-effects/0.4/effects/current_time/index.html.gz and b/gems/dry-effects/0.4/effects/current_time/index.html.gz differ
diff --git a/gems/dry-effects/0.4/effects/defer/index.html b/gems/dry-effects/0.4/effects/defer/index.html
index 9dd6a9dcb2..2c5d32702a 100644
--- a/gems/dry-effects/0.4/effects/defer/index.html
+++ b/gems/dry-effects/0.4/effects/defer/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Deferred execution

Defer adds three methods for working with deferred code execution:

+});

Deferred execution

Defer adds three methods for working with deferred code execution:

  • defer accepts a block and executes it (potentially) on a thread pool. It returns an object that can be awaited with wait. These objects are Promises made by concurrent-ruby. You can use their API, but it's not fully supported and tested in conjunction with effects.
  • diff --git a/gems/dry-effects/0.4/effects/defer/index.html.gz b/gems/dry-effects/0.4/effects/defer/index.html.gz index df8610d812..a596f8539f 100644 Binary files a/gems/dry-effects/0.4/effects/defer/index.html.gz and b/gems/dry-effects/0.4/effects/defer/index.html.gz differ diff --git a/gems/dry-effects/0.4/effects/env/index.html b/gems/dry-effects/0.4/effects/env/index.html index 1986aa0e9c..c988458784 100644 --- a/gems/dry-effects/0.4/effects/env/index.html +++ b/gems/dry-effects/0.4/effects/env/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Environment

Configuring code via ENV can be handy, but testing it by mutating a global constant is usually not. Env is similar to Reader but exists for passing simple key-value pairs, precisely what ENV does.

+});

Effects

dry-effects has a bunch of built-in effects and providers:

  • Reader
  • diff --git a/gems/dry-effects/0.4/effects/index.html.gz b/gems/dry-effects/0.4/effects/index.html.gz index 97a5705c2e..e56927d9c6 100644 Binary files a/gems/dry-effects/0.4/effects/index.html.gz and b/gems/dry-effects/0.4/effects/index.html.gz differ diff --git a/gems/dry-effects/0.4/effects/interrupt/index.html b/gems/dry-effects/0.4/effects/interrupt/index.html index 1766db1240..ed841a5cb3 100644 --- a/gems/dry-effects/0.4/effects/interrupt/index.html +++ b/gems/dry-effects/0.4/effects/interrupt/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Interrupt

Interrupt is an effect with the semantics of raise/rescue or throw/catch. It's added for consistency and compatibility with other effects. Underneath, it uses raise + rescue so that application code can detect the bubbling.

+});

Parallel execution

There are two effects for using parallelism:

  • par creates a unit of parallel execution;
  • diff --git a/gems/dry-effects/0.4/effects/parallel/index.html.gz b/gems/dry-effects/0.4/effects/parallel/index.html.gz index f6b0d67d87..718ddfb5f9 100644 Binary files a/gems/dry-effects/0.4/effects/parallel/index.html.gz and b/gems/dry-effects/0.4/effects/parallel/index.html.gz differ diff --git a/gems/dry-effects/0.4/effects/reader/index.html b/gems/dry-effects/0.4/effects/reader/index.html index b1b9d40da8..10744822d7 100644 --- a/gems/dry-effects/0.4/effects/reader/index.html +++ b/gems/dry-effects/0.4/effects/reader/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Reader

Reader is the simplest effect. It passes a value down to the stack.

+});

Reader

Reader is the simplest effect. It passes a value down to the stack.

require 'dry/effects'
 
 class SetLocaleMiddleware
diff --git a/gems/dry-effects/0.4/effects/reader/index.html.gz b/gems/dry-effects/0.4/effects/reader/index.html.gz
index 91ad982913..005ac3f4cd 100644
Binary files a/gems/dry-effects/0.4/effects/reader/index.html.gz and b/gems/dry-effects/0.4/effects/reader/index.html.gz differ
diff --git a/gems/dry-effects/0.4/effects/resolve/index.html b/gems/dry-effects/0.4/effects/resolve/index.html
index 424482880d..c075a83dd8 100644
--- a/gems/dry-effects/0.4/effects/resolve/index.html
+++ b/gems/dry-effects/0.4/effects/resolve/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Resolve (Dependency Injection)

Resolve is an effect for injecting dependencies. A simple usage example:

+});

Resolve (Dependency Injection)

Resolve is an effect for injecting dependencies. A simple usage example:

require 'dry/effects'
 
 class CreateUser
diff --git a/gems/dry-effects/0.4/effects/resolve/index.html.gz b/gems/dry-effects/0.4/effects/resolve/index.html.gz
index 19fb9697c1..f86a04b03d 100644
Binary files a/gems/dry-effects/0.4/effects/resolve/index.html.gz and b/gems/dry-effects/0.4/effects/resolve/index.html.gz differ
diff --git a/gems/dry-effects/0.4/effects/state/index.html b/gems/dry-effects/0.4/effects/state/index.html
index f3d9324720..119479ece7 100644
--- a/gems/dry-effects/0.4/effects/state/index.html
+++ b/gems/dry-effects/0.4/effects/state/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

State

State is a mutation effect. It allows reading and writing non-local values.

+});

Timeout

Timeout consists of two methods:

  • timeout returns an ever-decreasing number of seconds until this number reaches 0.
  • diff --git a/gems/dry-effects/0.4/effects/timeout/index.html.gz b/gems/dry-effects/0.4/effects/timeout/index.html.gz index 504021b895..4c6ebb82ab 100644 Binary files a/gems/dry-effects/0.4/effects/timeout/index.html.gz and b/gems/dry-effects/0.4/effects/timeout/index.html.gz differ diff --git a/gems/dry-effects/0.4/index.html b/gems/dry-effects/0.4/index.html index 65af80dbd7..c1aa4ff9bc 100644 --- a/gems/dry-effects/0.4/index.html +++ b/gems/dry-effects/0.4/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-effects is a practical, production-oriented implementation of algebraic effects in Ruby.

+});

Cache

Cache provides two interfaces for caching. Set up a handler:

require 'dry/effects'
 
 class CacheMiddleware
diff --git a/gems/dry-effects/main/effects/cache/index.html.gz b/gems/dry-effects/main/effects/cache/index.html.gz
index 623fdb3890..9607765ae6 100644
Binary files a/gems/dry-effects/main/effects/cache/index.html.gz and b/gems/dry-effects/main/effects/cache/index.html.gz differ
diff --git a/gems/dry-effects/main/effects/current_time/index.html b/gems/dry-effects/main/effects/current_time/index.html
index 72330a4f31..8e399026b6 100644
--- a/gems/dry-effects/main/effects/current_time/index.html
+++ b/gems/dry-effects/main/effects/current_time/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Current Time

Obtaining the current time with Time.now is a classic example of a side effect. Code relying on accessing system time is harder to test. One possible solution is passing time around explicitly, but using effects can save you some typing depending on the case.

+});

Current Time

Obtaining the current time with Time.now is a classic example of a side effect. Code relying on accessing system time is harder to test. One possible solution is passing time around explicitly, but using effects can save you some typing depending on the case.

Providing and obtaining the current time is straightforward:

require 'dry/effects'
diff --git a/gems/dry-effects/main/effects/current_time/index.html.gz b/gems/dry-effects/main/effects/current_time/index.html.gz
index 45ef238bda..3aae5b4d7f 100644
Binary files a/gems/dry-effects/main/effects/current_time/index.html.gz and b/gems/dry-effects/main/effects/current_time/index.html.gz differ
diff --git a/gems/dry-effects/main/effects/defer/index.html b/gems/dry-effects/main/effects/defer/index.html
index 0bff00d2c2..f6677d6534 100644
--- a/gems/dry-effects/main/effects/defer/index.html
+++ b/gems/dry-effects/main/effects/defer/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Deferred execution

Defer adds three methods for working with deferred code execution:

+});

Deferred execution

Defer adds three methods for working with deferred code execution:

  • defer accepts a block and executes it (potentially) on a thread pool. It returns an object that can be awaited with wait. These objects are Promises made by concurrent-ruby. You can use their API, but it's not fully supported and tested in conjunction with effects.
  • diff --git a/gems/dry-effects/main/effects/defer/index.html.gz b/gems/dry-effects/main/effects/defer/index.html.gz index 34037d6a43..951d10d0f6 100644 Binary files a/gems/dry-effects/main/effects/defer/index.html.gz and b/gems/dry-effects/main/effects/defer/index.html.gz differ diff --git a/gems/dry-effects/main/effects/env/index.html b/gems/dry-effects/main/effects/env/index.html index ee8f866735..d9e7079dc6 100644 --- a/gems/dry-effects/main/effects/env/index.html +++ b/gems/dry-effects/main/effects/env/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Environment

Configuring code via ENV can be handy, but testing it by mutating a global constant is usually not. Env is similar to Reader but exists for passing simple key-value pairs, precisely what ENV does.

+});

Effects

dry-effects has a bunch of built-in effects and providers:

  • Reader
  • diff --git a/gems/dry-effects/main/effects/index.html.gz b/gems/dry-effects/main/effects/index.html.gz index feabb2a3ed..77371be808 100644 Binary files a/gems/dry-effects/main/effects/index.html.gz and b/gems/dry-effects/main/effects/index.html.gz differ diff --git a/gems/dry-effects/main/effects/interrupt/index.html b/gems/dry-effects/main/effects/interrupt/index.html index fd69d9cda9..ab197cdcb6 100644 --- a/gems/dry-effects/main/effects/interrupt/index.html +++ b/gems/dry-effects/main/effects/interrupt/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Interrupt

Interrupt is an effect with the semantics of raise/rescue or throw/catch. It's added for consistency and compatibility with other effects. Underneath, it uses raise + rescue so that application code can detect the bubbling.

+});

Parallel execution

There are two effects for using parallelism:

  • par creates a unit of parallel execution;
  • diff --git a/gems/dry-effects/main/effects/parallel/index.html.gz b/gems/dry-effects/main/effects/parallel/index.html.gz index f016fd3302..72ba6e1d3e 100644 Binary files a/gems/dry-effects/main/effects/parallel/index.html.gz and b/gems/dry-effects/main/effects/parallel/index.html.gz differ diff --git a/gems/dry-effects/main/effects/reader/index.html b/gems/dry-effects/main/effects/reader/index.html index 75793a5693..118546b8ed 100644 --- a/gems/dry-effects/main/effects/reader/index.html +++ b/gems/dry-effects/main/effects/reader/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Reader

Reader is the simplest effect. It passes a value down to the stack.

+});

Reader

Reader is the simplest effect. It passes a value down to the stack.

require 'dry/effects'
 
 class SetLocaleMiddleware
diff --git a/gems/dry-effects/main/effects/reader/index.html.gz b/gems/dry-effects/main/effects/reader/index.html.gz
index 842df0ce79..3065fe29bb 100644
Binary files a/gems/dry-effects/main/effects/reader/index.html.gz and b/gems/dry-effects/main/effects/reader/index.html.gz differ
diff --git a/gems/dry-effects/main/effects/resolve/index.html b/gems/dry-effects/main/effects/resolve/index.html
index 12b64cef06..26e2d6dd29 100644
--- a/gems/dry-effects/main/effects/resolve/index.html
+++ b/gems/dry-effects/main/effects/resolve/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Resolve (Dependency Injection)

Resolve is an effect for injecting dependencies. A simple usage example:

+});

Resolve (Dependency Injection)

Resolve is an effect for injecting dependencies. A simple usage example:

require 'dry/effects'
 
 class CreateUser
diff --git a/gems/dry-effects/main/effects/resolve/index.html.gz b/gems/dry-effects/main/effects/resolve/index.html.gz
index 8290381e94..958153dbb2 100644
Binary files a/gems/dry-effects/main/effects/resolve/index.html.gz and b/gems/dry-effects/main/effects/resolve/index.html.gz differ
diff --git a/gems/dry-effects/main/effects/state/index.html b/gems/dry-effects/main/effects/state/index.html
index ba29f2197a..bb81555526 100644
--- a/gems/dry-effects/main/effects/state/index.html
+++ b/gems/dry-effects/main/effects/state/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

State

State is a mutation effect. It allows reading and writing non-local values.

+});

Timeout

Timeout consists of two methods:

  • timeout returns an ever-decreasing number of seconds until this number reaches 0.
  • diff --git a/gems/dry-effects/main/effects/timeout/index.html.gz b/gems/dry-effects/main/effects/timeout/index.html.gz index 0e51d903ea..451b12e9ce 100644 Binary files a/gems/dry-effects/main/effects/timeout/index.html.gz and b/gems/dry-effects/main/effects/timeout/index.html.gz differ diff --git a/gems/dry-effects/main/index.html b/gems/dry-effects/main/index.html index 0bbfa12602..0dfbca6857 100644 --- a/gems/dry-effects/main/index.html +++ b/gems/dry-effects/main/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-effects is a practical, production-oriented implementation of algebraic effects in Ruby.

+});

Introduction

dry-events is a library providing pub/sub API allowing you to create event publishers and a convenient way of subscribing to the events. This library is used as the pub/sub backend in dry-monitor, which also powers monitoring plugin in dry-system.

+});

Introduction

dry-events is a library providing pub/sub API allowing you to create event publishers and a convenient way of subscribing to the events. This library is used as the pub/sub backend in dry-monitor, which also powers monitoring plugin in dry-system.

+});

Introduction

dry-events is a library providing pub/sub API allowing you to create event publishers and a convenient way of subscribing to the events. This library is used as the pub/sub backend in dry-monitor, which also powers monitoring plugin in dry-system.

+});

Introduction

dry-events is a library providing pub/sub API allowing you to create event publishers and a convenient way of subscribing to the events. This library is used as the pub/sub backend in dry-monitor, which also powers monitoring plugin in dry-system.

+});

Introduction

dry-events is a library providing pub/sub API allowing you to create event publishers and a convenient way of subscribing to the events. This library is used as the pub/sub backend in dry-monitor, which also powers monitoring plugin in dry-system.

+});

Adapters

Adapters

diff --git a/gems/dry-files/0.1/adapters/index.html.gz b/gems/dry-files/0.1/adapters/index.html.gz index 442e674c51..b913211b9b 100644 Binary files a/gems/dry-files/0.1/adapters/index.html.gz and b/gems/dry-files/0.1/adapters/index.html.gz differ diff --git a/gems/dry-files/0.1/error-handling/index.html b/gems/dry-files/0.1/error-handling/index.html index 783b3a56fb..d8454b4c29 100644 --- a/gems/dry-files/0.1/error-handling/index.html +++ b/gems/dry-files/0.1/error-handling/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Error Handling

Error Handling

diff --git a/gems/dry-files/0.1/error-handling/index.html.gz b/gems/dry-files/0.1/error-handling/index.html.gz index 2ad043f2bd..a667d7022e 100644 Binary files a/gems/dry-files/0.1/error-handling/index.html.gz and b/gems/dry-files/0.1/error-handling/index.html.gz differ diff --git a/gems/dry-files/0.1/file-system-utilities/index.html b/gems/dry-files/0.1/file-system-utilities/index.html index 900e36918b..c7363ce402 100644 --- a/gems/dry-files/0.1/file-system-utilities/index.html +++ b/gems/dry-files/0.1/file-system-utilities/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

File System Utilities

File System Utilities

# frozen_string_literal: true
diff --git a/gems/dry-files/0.1/file-system-utilities/index.html.gz b/gems/dry-files/0.1/file-system-utilities/index.html.gz
index 09f4330c45..196608b9c7 100644
Binary files a/gems/dry-files/0.1/file-system-utilities/index.html.gz and b/gems/dry-files/0.1/file-system-utilities/index.html.gz differ
diff --git a/gems/dry-files/0.1/index.html b/gems/dry-files/0.1/index.html
index 8dd6c4a920..68582a68fe 100644
--- a/gems/dry-files/0.1/index.html
+++ b/gems/dry-files/0.1/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-files is Ruby gem that provides a great abstraction for file manipulations.

+});

Ruby File Manipulation

Ruby File Manipulation

# frozen_string_literal: true
diff --git a/gems/dry-files/0.1/ruby-file-manipulation/index.html.gz b/gems/dry-files/0.1/ruby-file-manipulation/index.html.gz
index c759948104..e792505f7a 100644
Binary files a/gems/dry-files/0.1/ruby-file-manipulation/index.html.gz and b/gems/dry-files/0.1/ruby-file-manipulation/index.html.gz differ
diff --git a/gems/dry-files/0.2/adapters/index.html b/gems/dry-files/0.2/adapters/index.html
index 93fa84ec95..3e0a997b6f 100644
--- a/gems/dry-files/0.2/adapters/index.html
+++ b/gems/dry-files/0.2/adapters/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Adapters

Adapters

diff --git a/gems/dry-files/0.2/adapters/index.html.gz b/gems/dry-files/0.2/adapters/index.html.gz index dbfccc20eb..8c50c79d90 100644 Binary files a/gems/dry-files/0.2/adapters/index.html.gz and b/gems/dry-files/0.2/adapters/index.html.gz differ diff --git a/gems/dry-files/0.2/error-handling/index.html b/gems/dry-files/0.2/error-handling/index.html index 8ac893cbdf..7bda4b8d24 100644 --- a/gems/dry-files/0.2/error-handling/index.html +++ b/gems/dry-files/0.2/error-handling/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Error Handling

Error Handling

diff --git a/gems/dry-files/0.2/error-handling/index.html.gz b/gems/dry-files/0.2/error-handling/index.html.gz index 8bebf9b39d..b9c0bc7143 100644 Binary files a/gems/dry-files/0.2/error-handling/index.html.gz and b/gems/dry-files/0.2/error-handling/index.html.gz differ diff --git a/gems/dry-files/0.2/file-system-utilities/index.html b/gems/dry-files/0.2/file-system-utilities/index.html index f87035b9b7..e39bce5881 100644 --- a/gems/dry-files/0.2/file-system-utilities/index.html +++ b/gems/dry-files/0.2/file-system-utilities/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

File System Utilities

File System Utilities

# frozen_string_literal: true
diff --git a/gems/dry-files/0.2/file-system-utilities/index.html.gz b/gems/dry-files/0.2/file-system-utilities/index.html.gz
index f45739d23c..eb1e0a37d5 100644
Binary files a/gems/dry-files/0.2/file-system-utilities/index.html.gz and b/gems/dry-files/0.2/file-system-utilities/index.html.gz differ
diff --git a/gems/dry-files/0.2/index.html b/gems/dry-files/0.2/index.html
index c7609e8e3c..040c95d550 100644
--- a/gems/dry-files/0.2/index.html
+++ b/gems/dry-files/0.2/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-files is Ruby gem that provides a great abstraction for file manipulations.

+});

Ruby File Manipulation

Ruby File Manipulation

# frozen_string_literal: true
diff --git a/gems/dry-files/0.2/ruby-file-manipulation/index.html.gz b/gems/dry-files/0.2/ruby-file-manipulation/index.html.gz
index d5c672002a..32cf68c665 100644
Binary files a/gems/dry-files/0.2/ruby-file-manipulation/index.html.gz and b/gems/dry-files/0.2/ruby-file-manipulation/index.html.gz differ
diff --git a/gems/dry-files/0.3/adapters/index.html b/gems/dry-files/0.3/adapters/index.html
index c1b2f02788..e6bb08a945 100644
--- a/gems/dry-files/0.3/adapters/index.html
+++ b/gems/dry-files/0.3/adapters/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Adapters

Adapters

diff --git a/gems/dry-files/0.3/adapters/index.html.gz b/gems/dry-files/0.3/adapters/index.html.gz index 7f349427d4..6d818b9ee3 100644 Binary files a/gems/dry-files/0.3/adapters/index.html.gz and b/gems/dry-files/0.3/adapters/index.html.gz differ diff --git a/gems/dry-files/0.3/error-handling/index.html b/gems/dry-files/0.3/error-handling/index.html index 382a93cf51..0f352b137f 100644 --- a/gems/dry-files/0.3/error-handling/index.html +++ b/gems/dry-files/0.3/error-handling/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Error Handling

Error Handling

diff --git a/gems/dry-files/0.3/error-handling/index.html.gz b/gems/dry-files/0.3/error-handling/index.html.gz index dd67dd3d96..27fb05fcc9 100644 Binary files a/gems/dry-files/0.3/error-handling/index.html.gz and b/gems/dry-files/0.3/error-handling/index.html.gz differ diff --git a/gems/dry-files/0.3/file-system-utilities/index.html b/gems/dry-files/0.3/file-system-utilities/index.html index 79c14fc258..38c1bd39a8 100644 --- a/gems/dry-files/0.3/file-system-utilities/index.html +++ b/gems/dry-files/0.3/file-system-utilities/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

File System Utilities

File System Utilities

# frozen_string_literal: true
diff --git a/gems/dry-files/0.3/file-system-utilities/index.html.gz b/gems/dry-files/0.3/file-system-utilities/index.html.gz
index 882a527c8e..a16a45a9b5 100644
Binary files a/gems/dry-files/0.3/file-system-utilities/index.html.gz and b/gems/dry-files/0.3/file-system-utilities/index.html.gz differ
diff --git a/gems/dry-files/0.3/index.html b/gems/dry-files/0.3/index.html
index 5b8b04e44d..aca7092280 100644
--- a/gems/dry-files/0.3/index.html
+++ b/gems/dry-files/0.3/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-files is Ruby gem that provides a great abstraction for file manipulations.

+});

Ruby File Manipulation

Ruby File Manipulation

# frozen_string_literal: true
diff --git a/gems/dry-files/0.3/ruby-file-manipulation/index.html.gz b/gems/dry-files/0.3/ruby-file-manipulation/index.html.gz
index c37bc457e7..df870d76c6 100644
Binary files a/gems/dry-files/0.3/ruby-file-manipulation/index.html.gz and b/gems/dry-files/0.3/ruby-file-manipulation/index.html.gz differ
diff --git a/gems/dry-files/1.0/adapters/index.html b/gems/dry-files/1.0/adapters/index.html
index 93c36d8a61..0148a2fcf9 100644
--- a/gems/dry-files/1.0/adapters/index.html
+++ b/gems/dry-files/1.0/adapters/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Adapters

Adapters

diff --git a/gems/dry-files/1.0/adapters/index.html.gz b/gems/dry-files/1.0/adapters/index.html.gz index c7776354de..ea3ebcfd3a 100644 Binary files a/gems/dry-files/1.0/adapters/index.html.gz and b/gems/dry-files/1.0/adapters/index.html.gz differ diff --git a/gems/dry-files/1.0/error-handling/index.html b/gems/dry-files/1.0/error-handling/index.html index ff1acf22b9..262851f101 100644 --- a/gems/dry-files/1.0/error-handling/index.html +++ b/gems/dry-files/1.0/error-handling/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Error Handling

Error Handling

diff --git a/gems/dry-files/1.0/error-handling/index.html.gz b/gems/dry-files/1.0/error-handling/index.html.gz index a97f4b90c8..d0426e8d42 100644 Binary files a/gems/dry-files/1.0/error-handling/index.html.gz and b/gems/dry-files/1.0/error-handling/index.html.gz differ diff --git a/gems/dry-files/1.0/file-system-utilities/index.html b/gems/dry-files/1.0/file-system-utilities/index.html index a75c4f873d..fc3946a230 100644 --- a/gems/dry-files/1.0/file-system-utilities/index.html +++ b/gems/dry-files/1.0/file-system-utilities/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

File System Utilities

File System Utilities

# frozen_string_literal: true
diff --git a/gems/dry-files/1.0/file-system-utilities/index.html.gz b/gems/dry-files/1.0/file-system-utilities/index.html.gz
index b266a19ce2..013a9638fb 100644
Binary files a/gems/dry-files/1.0/file-system-utilities/index.html.gz and b/gems/dry-files/1.0/file-system-utilities/index.html.gz differ
diff --git a/gems/dry-files/1.0/index.html b/gems/dry-files/1.0/index.html
index fd376949f5..d6fcc81e47 100644
--- a/gems/dry-files/1.0/index.html
+++ b/gems/dry-files/1.0/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-files is Ruby gem that provides a great abstraction for file manipulations.

+});

Ruby File Manipulation

Ruby File Manipulation

# frozen_string_literal: true
diff --git a/gems/dry-files/1.0/ruby-file-manipulation/index.html.gz b/gems/dry-files/1.0/ruby-file-manipulation/index.html.gz
index 783ffe7aab..746e96a5b8 100644
Binary files a/gems/dry-files/1.0/ruby-file-manipulation/index.html.gz and b/gems/dry-files/1.0/ruby-file-manipulation/index.html.gz differ
diff --git a/gems/dry-files/index.html.gz b/gems/dry-files/index.html.gz
index 29698118a5..f4409172d4 100644
Binary files a/gems/dry-files/index.html.gz and b/gems/dry-files/index.html.gz differ
diff --git a/gems/dry-inflector/0.1/index.html b/gems/dry-inflector/0.1/index.html
index 45b7e8254b..3479605cd0 100644
--- a/gems/dry-inflector/0.1/index.html
+++ b/gems/dry-inflector/0.1/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-inflector is an inflector gem for Ruby, which provides a configurable inflector object, rather than using a singleton.

+});

Introduction

dry-inflector is an inflector gem for Ruby, which provides a configurable inflector object, rather than using a singleton.

+});

Introduction

dry-inflector is an inflector gem for Ruby, which provides a configurable inflector object, rather than using a singleton.

+});

Introduction

dry-inflector is an inflector gem for Ruby, which provides a configurable inflector object, rather than using a singleton.

+});

Introduction

dry-inflector is an inflector gem for Ruby, which provides a configurable inflector object, rather than using a singleton.

+});

Attributes

Sometimes you need to access all attributes assigned via params and options of the object constructor.

+});

Attributes

Sometimes you need to access all attributes assigned via params and options of the object constructor.

We support 2 methods: attributes and public_attributes for this goal. Both methods are wrapped into container accessible via .dry_types container:

require 'dry-initializer'
diff --git a/gems/dry-initializer/0.4/attributes/index.html.gz b/gems/dry-initializer/0.4/attributes/index.html.gz
index 08a620ffd1..10613b6acc 100644
Binary files a/gems/dry-initializer/0.4/attributes/index.html.gz and b/gems/dry-initializer/0.4/attributes/index.html.gz differ
diff --git a/gems/dry-initializer/0.4/container-version/index.html b/gems/dry-initializer/0.4/container-version/index.html
index a359059397..b9dbf0b1ad 100644
--- a/gems/dry-initializer/0.4/container-version/index.html
+++ b/gems/dry-initializer/0.4/container-version/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container Version

Instead of extending a class with the Dry::Initializer, you can include a container with the initializer method only. This method should be preferred when you don't need subclassing.

+});

Container Version

Instead of extending a class with the Dry::Initializer, you can include a container with the initializer method only. This method should be preferred when you don't need subclassing.

require 'dry-initializer'
 
 class User
diff --git a/gems/dry-initializer/0.4/container-version/index.html.gz b/gems/dry-initializer/0.4/container-version/index.html.gz
index 673df6af73..243aa6fd0b 100644
Binary files a/gems/dry-initializer/0.4/container-version/index.html.gz and b/gems/dry-initializer/0.4/container-version/index.html.gz differ
diff --git a/gems/dry-initializer/0.4/index.html b/gems/dry-initializer/0.4/index.html
index 04a142ea0b..95d12c5e46 100644
--- a/gems/dry-initializer/0.4/index.html
+++ b/gems/dry-initializer/0.4/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Inheritance

Subclassing preserves all definitions being made inside a superclass.

require 'dry-initializer'
 
 class User
diff --git a/gems/dry-initializer/0.4/inheritance/index.html.gz b/gems/dry-initializer/0.4/inheritance/index.html.gz
index 300c53452d..234cc031c6 100644
Binary files a/gems/dry-initializer/0.4/inheritance/index.html.gz and b/gems/dry-initializer/0.4/inheritance/index.html.gz differ
diff --git a/gems/dry-initializer/0.4/optionals-and-defaults/index.html b/gems/dry-initializer/0.4/optionals-and-defaults/index.html
index 0bac2678a4..06199d8c00 100644
--- a/gems/dry-initializer/0.4/optionals-and-defaults/index.html
+++ b/gems/dry-initializer/0.4/optionals-and-defaults/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Optional Attributes and Default Values

By default both params and options are mandatory. Use :default key to make them optional:

+});

Optional Attributes and Default Values

By default both params and options are mandatory. Use :default key to make them optional:

require 'dry-initializer'
 
 class User
diff --git a/gems/dry-initializer/0.4/optionals-and-defaults/index.html.gz b/gems/dry-initializer/0.4/optionals-and-defaults/index.html.gz
index 1a51744997..6440883e88 100644
Binary files a/gems/dry-initializer/0.4/optionals-and-defaults/index.html.gz and b/gems/dry-initializer/0.4/optionals-and-defaults/index.html.gz differ
diff --git a/gems/dry-initializer/0.4/options-tolerance/index.html b/gems/dry-initializer/0.4/options-tolerance/index.html
index 532f121674..1d81eeb804 100644
--- a/gems/dry-initializer/0.4/options-tolerance/index.html
+++ b/gems/dry-initializer/0.4/options-tolerance/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Tolerance to Unknown Options

By default the initializer is strict for params (positional arguments), expecting them to be defined explicitly.

+});

Tolerance to Unknown Options

By default the initializer is strict for params (positional arguments), expecting them to be defined explicitly.

require 'dry-initializer'
 
 class User
diff --git a/gems/dry-initializer/0.4/options-tolerance/index.html.gz b/gems/dry-initializer/0.4/options-tolerance/index.html.gz
index f29c4789ca..58094e6305 100644
Binary files a/gems/dry-initializer/0.4/options-tolerance/index.html.gz and b/gems/dry-initializer/0.4/options-tolerance/index.html.gz differ
diff --git a/gems/dry-initializer/0.4/params-and-options/index.html b/gems/dry-initializer/0.4/params-and-options/index.html
index 0e9738f7ef..4738f8ec05 100644
--- a/gems/dry-initializer/0.4/params-and-options/index.html
+++ b/gems/dry-initializer/0.4/params-and-options/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Params and Options

Use param to define plain argument:

require 'dry-initializer'
 
 class User
diff --git a/gems/dry-initializer/0.4/params-and-options/index.html.gz b/gems/dry-initializer/0.4/params-and-options/index.html.gz
index 5b89b8e90c..2d133076be 100644
Binary files a/gems/dry-initializer/0.4/params-and-options/index.html.gz and b/gems/dry-initializer/0.4/params-and-options/index.html.gz differ
diff --git a/gems/dry-initializer/0.4/rails-support/index.html b/gems/dry-initializer/0.4/rails-support/index.html
index eb7769cee9..fb91ed2d94 100644
--- a/gems/dry-initializer/0.4/rails-support/index.html
+++ b/gems/dry-initializer/0.4/rails-support/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Readers

By default public attribute reader is defined for every param and option.

You can define private or protected reader instead:

require 'dry-initializer'
diff --git a/gems/dry-initializer/0.4/readers/index.html.gz b/gems/dry-initializer/0.4/readers/index.html.gz
index 9930683016..a751fe3329 100644
Binary files a/gems/dry-initializer/0.4/readers/index.html.gz and b/gems/dry-initializer/0.4/readers/index.html.gz differ
diff --git a/gems/dry-initializer/0.4/skip-undefined/index.html b/gems/dry-initializer/0.4/skip-undefined/index.html
index 29be94f3ec..634ada3df0 100644
--- a/gems/dry-initializer/0.4/skip-undefined/index.html
+++ b/gems/dry-initializer/0.4/skip-undefined/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Skip Undefined

The initializer uses special constant Dry::Initializer::UNDEFINED to distinguish variables that are set to nil from those that are not set at all.

+});

Skip Undefined

The initializer uses special constant Dry::Initializer::UNDEFINED to distinguish variables that are set to nil from those that are not set at all.

When no value was provided, the constant is assigned to a variable, but hidden in a reader.

require 'dry-initializer'
diff --git a/gems/dry-initializer/0.4/skip-undefined/index.html.gz b/gems/dry-initializer/0.4/skip-undefined/index.html.gz
index 53ba26ae3d..ebf05296c6 100644
Binary files a/gems/dry-initializer/0.4/skip-undefined/index.html.gz and b/gems/dry-initializer/0.4/skip-undefined/index.html.gz differ
diff --git a/gems/dry-initializer/0.4/type-constraints/index.html b/gems/dry-initializer/0.4/type-constraints/index.html
index 93fcd4dc60..becd009223 100644
--- a/gems/dry-initializer/0.4/type-constraints/index.html
+++ b/gems/dry-initializer/0.4/type-constraints/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Type Constraints

Base Syntax

diff --git a/gems/dry-initializer/0.4/type-constraints/index.html.gz b/gems/dry-initializer/0.4/type-constraints/index.html.gz index 839a099680..93f0c8572f 100644 Binary files a/gems/dry-initializer/0.4/type-constraints/index.html.gz and b/gems/dry-initializer/0.4/type-constraints/index.html.gz differ diff --git a/gems/dry-initializer/3.0/attributes/index.html b/gems/dry-initializer/3.0/attributes/index.html index 6fcc7f287b..be7d773adc 100644 --- a/gems/dry-initializer/3.0/attributes/index.html +++ b/gems/dry-initializer/3.0/attributes/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Attributes

Sometimes you need to access all attributes assigned via params and options of the object constructor.

+});

Attributes

Sometimes you need to access all attributes assigned via params and options of the object constructor.

We support 2 methods: attributes and public_attributes for this goal. Both methods are wrapped into container accessible via .dry_types container:

require 'dry-initializer'
diff --git a/gems/dry-initializer/3.0/attributes/index.html.gz b/gems/dry-initializer/3.0/attributes/index.html.gz
index e91965a280..e9b204c474 100644
Binary files a/gems/dry-initializer/3.0/attributes/index.html.gz and b/gems/dry-initializer/3.0/attributes/index.html.gz differ
diff --git a/gems/dry-initializer/3.0/container-version/index.html b/gems/dry-initializer/3.0/container-version/index.html
index 056ed5036a..9e1a46e224 100644
--- a/gems/dry-initializer/3.0/container-version/index.html
+++ b/gems/dry-initializer/3.0/container-version/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container Version

Instead of extending a class with the Dry::Initializer, you can include a container with the initializer method only. This method should be preferred when you don't need subclassing.

+});

Container Version

Instead of extending a class with the Dry::Initializer, you can include a container with the initializer method only. This method should be preferred when you don't need subclassing.

require 'dry-initializer'
 
 class User
diff --git a/gems/dry-initializer/3.0/container-version/index.html.gz b/gems/dry-initializer/3.0/container-version/index.html.gz
index 8b6e84d981..b6ff4b52c7 100644
Binary files a/gems/dry-initializer/3.0/container-version/index.html.gz and b/gems/dry-initializer/3.0/container-version/index.html.gz differ
diff --git a/gems/dry-initializer/3.0/index.html b/gems/dry-initializer/3.0/index.html
index ce4211282b..7962fbe756 100644
--- a/gems/dry-initializer/3.0/index.html
+++ b/gems/dry-initializer/3.0/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Inheritance

Subclassing preserves all definitions being made inside a superclass.

require 'dry-initializer'
 
 class User
diff --git a/gems/dry-initializer/3.0/inheritance/index.html.gz b/gems/dry-initializer/3.0/inheritance/index.html.gz
index fd6224a991..26d616a422 100644
Binary files a/gems/dry-initializer/3.0/inheritance/index.html.gz and b/gems/dry-initializer/3.0/inheritance/index.html.gz differ
diff --git a/gems/dry-initializer/3.0/optionals-and-defaults/index.html b/gems/dry-initializer/3.0/optionals-and-defaults/index.html
index b9b8f222fb..61d160e0dc 100644
--- a/gems/dry-initializer/3.0/optionals-and-defaults/index.html
+++ b/gems/dry-initializer/3.0/optionals-and-defaults/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Optional Attributes and Default Values

By default both params and options are mandatory. Use :default key to make them optional:

+});

Optional Attributes and Default Values

By default both params and options are mandatory. Use :default key to make them optional:

require 'dry-initializer'
 
 class User
diff --git a/gems/dry-initializer/3.0/optionals-and-defaults/index.html.gz b/gems/dry-initializer/3.0/optionals-and-defaults/index.html.gz
index 239929fc3e..61609c655e 100644
Binary files a/gems/dry-initializer/3.0/optionals-and-defaults/index.html.gz and b/gems/dry-initializer/3.0/optionals-and-defaults/index.html.gz differ
diff --git a/gems/dry-initializer/3.0/params-and-options/index.html b/gems/dry-initializer/3.0/params-and-options/index.html
index f5749a3eb5..f7614077d1 100644
--- a/gems/dry-initializer/3.0/params-and-options/index.html
+++ b/gems/dry-initializer/3.0/params-and-options/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Params and Options

Use param to define plain argument:

require 'dry-initializer'
 
 class User
diff --git a/gems/dry-initializer/3.0/params-and-options/index.html.gz b/gems/dry-initializer/3.0/params-and-options/index.html.gz
index 2f15e9a46c..31d0905ce1 100644
Binary files a/gems/dry-initializer/3.0/params-and-options/index.html.gz and b/gems/dry-initializer/3.0/params-and-options/index.html.gz differ
diff --git a/gems/dry-initializer/3.0/rails-support/index.html b/gems/dry-initializer/3.0/rails-support/index.html
index 6b52b2cf8f..dadfb4ffda 100644
--- a/gems/dry-initializer/3.0/rails-support/index.html
+++ b/gems/dry-initializer/3.0/rails-support/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Readers

By default public attribute reader is defined for every param and option.

You can define private or protected reader instead:

require 'dry-initializer'
diff --git a/gems/dry-initializer/3.0/readers/index.html.gz b/gems/dry-initializer/3.0/readers/index.html.gz
index e5b64fb197..90043c1876 100644
Binary files a/gems/dry-initializer/3.0/readers/index.html.gz and b/gems/dry-initializer/3.0/readers/index.html.gz differ
diff --git a/gems/dry-initializer/3.0/skip-undefined/index.html b/gems/dry-initializer/3.0/skip-undefined/index.html
index 88fb447daf..c59e63ef12 100644
--- a/gems/dry-initializer/3.0/skip-undefined/index.html
+++ b/gems/dry-initializer/3.0/skip-undefined/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Skip Undefined

The initializer uses special constant Dry::Initializer::UNDEFINED to distinguish variables that are set to nil from those that are not set at all.

+});

Skip Undefined

The initializer uses special constant Dry::Initializer::UNDEFINED to distinguish variables that are set to nil from those that are not set at all.

When no value was provided, the constant is assigned to a variable, but hidden in a reader.

require 'dry-initializer'
diff --git a/gems/dry-initializer/3.0/skip-undefined/index.html.gz b/gems/dry-initializer/3.0/skip-undefined/index.html.gz
index 9b2a7dba3a..449af1d7c0 100644
Binary files a/gems/dry-initializer/3.0/skip-undefined/index.html.gz and b/gems/dry-initializer/3.0/skip-undefined/index.html.gz differ
diff --git a/gems/dry-initializer/3.0/tolerance-to-unknown-arguments/index.html b/gems/dry-initializer/3.0/tolerance-to-unknown-arguments/index.html
index cbb77138bb..34f6edf97d 100644
--- a/gems/dry-initializer/3.0/tolerance-to-unknown-arguments/index.html
+++ b/gems/dry-initializer/3.0/tolerance-to-unknown-arguments/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Tolerance to Unknown Arguments

By default the initializer is tolerant for both params (positional arguments) and options. +});

Tolerance to Unknown Arguments

By default the initializer is tolerant for both params (positional arguments) and options. All unknown arguments of the initializer are ignored silently.

require 'dry-initializer'
 
diff --git a/gems/dry-initializer/3.0/tolerance-to-unknown-arguments/index.html.gz b/gems/dry-initializer/3.0/tolerance-to-unknown-arguments/index.html.gz
index d8153748a5..0a5e3908b7 100644
Binary files a/gems/dry-initializer/3.0/tolerance-to-unknown-arguments/index.html.gz and b/gems/dry-initializer/3.0/tolerance-to-unknown-arguments/index.html.gz differ
diff --git a/gems/dry-initializer/3.0/type-constraints/index.html b/gems/dry-initializer/3.0/type-constraints/index.html
index 62a7c0dfe9..522272a600 100644
--- a/gems/dry-initializer/3.0/type-constraints/index.html
+++ b/gems/dry-initializer/3.0/type-constraints/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Type Constraints

Base Syntax

diff --git a/gems/dry-initializer/3.0/type-constraints/index.html.gz b/gems/dry-initializer/3.0/type-constraints/index.html.gz index 852b91141a..708df632fa 100644 Binary files a/gems/dry-initializer/3.0/type-constraints/index.html.gz and b/gems/dry-initializer/3.0/type-constraints/index.html.gz differ diff --git a/gems/dry-initializer/3.1/attributes/index.html b/gems/dry-initializer/3.1/attributes/index.html index 8a5ac4052e..14596f9f7e 100644 --- a/gems/dry-initializer/3.1/attributes/index.html +++ b/gems/dry-initializer/3.1/attributes/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Attributes

Sometimes you need to access all attributes assigned via params and options of the object constructor.

+});

Attributes

Sometimes you need to access all attributes assigned via params and options of the object constructor.

We support 2 methods: attributes and public_attributes for this goal. Both methods are wrapped into container accessible via .dry_initializer container:

require 'dry-initializer'
diff --git a/gems/dry-initializer/3.1/attributes/index.html.gz b/gems/dry-initializer/3.1/attributes/index.html.gz
index 5fd24dfad0..4602a9f238 100644
Binary files a/gems/dry-initializer/3.1/attributes/index.html.gz and b/gems/dry-initializer/3.1/attributes/index.html.gz differ
diff --git a/gems/dry-initializer/3.1/container-version/index.html b/gems/dry-initializer/3.1/container-version/index.html
index ef53fbb798..2e59fac757 100644
--- a/gems/dry-initializer/3.1/container-version/index.html
+++ b/gems/dry-initializer/3.1/container-version/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container Version

Instead of extending a class with the Dry::Initializer, you can include a container with the initializer method only. This method should be preferred when you don't need subclassing.

+});

Container Version

Instead of extending a class with the Dry::Initializer, you can include a container with the initializer method only. This method should be preferred when you don't need subclassing.

require 'dry-initializer'
 
 class User
diff --git a/gems/dry-initializer/3.1/container-version/index.html.gz b/gems/dry-initializer/3.1/container-version/index.html.gz
index 0be3cf5565..15a7f24d26 100644
Binary files a/gems/dry-initializer/3.1/container-version/index.html.gz and b/gems/dry-initializer/3.1/container-version/index.html.gz differ
diff --git a/gems/dry-initializer/3.1/index.html b/gems/dry-initializer/3.1/index.html
index 540668b865..ad3d0f9743 100644
--- a/gems/dry-initializer/3.1/index.html
+++ b/gems/dry-initializer/3.1/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Inheritance

Subclassing preserves all definitions being made inside a superclass.

require 'dry-initializer'
 
 class User
diff --git a/gems/dry-initializer/3.1/inheritance/index.html.gz b/gems/dry-initializer/3.1/inheritance/index.html.gz
index 09d732e64f..9f6eda38e5 100644
Binary files a/gems/dry-initializer/3.1/inheritance/index.html.gz and b/gems/dry-initializer/3.1/inheritance/index.html.gz differ
diff --git a/gems/dry-initializer/3.1/optionals-and-defaults/index.html b/gems/dry-initializer/3.1/optionals-and-defaults/index.html
index 0624748bc4..c00a00d90c 100644
--- a/gems/dry-initializer/3.1/optionals-and-defaults/index.html
+++ b/gems/dry-initializer/3.1/optionals-and-defaults/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Optional Attributes and Default Values

By default both params and options are mandatory. Use :default key to make them optional:

+});

Optional Attributes and Default Values

By default both params and options are mandatory. Use :default key to make them optional:

require 'dry-initializer'
 
 class User
diff --git a/gems/dry-initializer/3.1/optionals-and-defaults/index.html.gz b/gems/dry-initializer/3.1/optionals-and-defaults/index.html.gz
index ba55b81cd7..6882672379 100644
Binary files a/gems/dry-initializer/3.1/optionals-and-defaults/index.html.gz and b/gems/dry-initializer/3.1/optionals-and-defaults/index.html.gz differ
diff --git a/gems/dry-initializer/3.1/params-and-options/index.html b/gems/dry-initializer/3.1/params-and-options/index.html
index 48967df9a3..ca5a547145 100644
--- a/gems/dry-initializer/3.1/params-and-options/index.html
+++ b/gems/dry-initializer/3.1/params-and-options/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Params and Options

Use param to define plain argument:

require 'dry-initializer'
 
 class User
diff --git a/gems/dry-initializer/3.1/params-and-options/index.html.gz b/gems/dry-initializer/3.1/params-and-options/index.html.gz
index 3c394590bd..2dc71ebb16 100644
Binary files a/gems/dry-initializer/3.1/params-and-options/index.html.gz and b/gems/dry-initializer/3.1/params-and-options/index.html.gz differ
diff --git a/gems/dry-initializer/3.1/rails-support/index.html b/gems/dry-initializer/3.1/rails-support/index.html
index 372a99092a..49ce150e28 100644
--- a/gems/dry-initializer/3.1/rails-support/index.html
+++ b/gems/dry-initializer/3.1/rails-support/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Readers

By default public attribute reader is defined for every param and option.

You can define private or protected reader instead:

require 'dry-initializer'
diff --git a/gems/dry-initializer/3.1/readers/index.html.gz b/gems/dry-initializer/3.1/readers/index.html.gz
index dbeeb166e7..45006eba9b 100644
Binary files a/gems/dry-initializer/3.1/readers/index.html.gz and b/gems/dry-initializer/3.1/readers/index.html.gz differ
diff --git a/gems/dry-initializer/3.1/skip-undefined/index.html b/gems/dry-initializer/3.1/skip-undefined/index.html
index 49be23c803..5115a608ca 100644
--- a/gems/dry-initializer/3.1/skip-undefined/index.html
+++ b/gems/dry-initializer/3.1/skip-undefined/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Skip Undefined

The initializer uses special constant Dry::Initializer::UNDEFINED to distinguish variables that are set to nil from those that are not set at all.

+});

Skip Undefined

The initializer uses special constant Dry::Initializer::UNDEFINED to distinguish variables that are set to nil from those that are not set at all.

When no value was provided, the constant is assigned to a variable, but hidden in a reader.

require 'dry-initializer'
diff --git a/gems/dry-initializer/3.1/skip-undefined/index.html.gz b/gems/dry-initializer/3.1/skip-undefined/index.html.gz
index 24314aeb14..e8fbdfe6df 100644
Binary files a/gems/dry-initializer/3.1/skip-undefined/index.html.gz and b/gems/dry-initializer/3.1/skip-undefined/index.html.gz differ
diff --git a/gems/dry-initializer/3.1/tolerance-to-unknown-arguments/index.html b/gems/dry-initializer/3.1/tolerance-to-unknown-arguments/index.html
index fc3e6c2be6..b0feb920f9 100644
--- a/gems/dry-initializer/3.1/tolerance-to-unknown-arguments/index.html
+++ b/gems/dry-initializer/3.1/tolerance-to-unknown-arguments/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Tolerance to Unknown Arguments

By default the initializer is tolerant for both params (positional arguments) and options. +});

Tolerance to Unknown Arguments

By default the initializer is tolerant for both params (positional arguments) and options. All unknown arguments of the initializer are ignored silently.

require 'dry-initializer'
 
diff --git a/gems/dry-initializer/3.1/tolerance-to-unknown-arguments/index.html.gz b/gems/dry-initializer/3.1/tolerance-to-unknown-arguments/index.html.gz
index 9f50f3a7d5..310d3425aa 100644
Binary files a/gems/dry-initializer/3.1/tolerance-to-unknown-arguments/index.html.gz and b/gems/dry-initializer/3.1/tolerance-to-unknown-arguments/index.html.gz differ
diff --git a/gems/dry-initializer/3.1/type-constraints/index.html b/gems/dry-initializer/3.1/type-constraints/index.html
index 7618dffbe8..137ca08020 100644
--- a/gems/dry-initializer/3.1/type-constraints/index.html
+++ b/gems/dry-initializer/3.1/type-constraints/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Type Constraints

Base Syntax

diff --git a/gems/dry-initializer/3.1/type-constraints/index.html.gz b/gems/dry-initializer/3.1/type-constraints/index.html.gz index fce81d1c27..67831b8c61 100644 Binary files a/gems/dry-initializer/3.1/type-constraints/index.html.gz and b/gems/dry-initializer/3.1/type-constraints/index.html.gz differ diff --git a/gems/dry-initializer/index.html.gz b/gems/dry-initializer/index.html.gz index b825e4f50c..bfba37f212 100644 Binary files a/gems/dry-initializer/index.html.gz and b/gems/dry-initializer/index.html.gz differ diff --git a/gems/dry-initializer/main/attributes/index.html b/gems/dry-initializer/main/attributes/index.html index f0903d40e6..b4692e5afd 100644 --- a/gems/dry-initializer/main/attributes/index.html +++ b/gems/dry-initializer/main/attributes/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-initializer main

Attributes

Sometimes you need to access all attributes assigned via params and options of the object constructor.

+});

dry-initializer main

Attributes

Sometimes you need to access all attributes assigned via params and options of the object constructor.

We support 2 methods: attributes and public_attributes for this goal. Both methods are wrapped into container accessible via .dry_initializer container:

require 'dry-initializer'
diff --git a/gems/dry-initializer/main/attributes/index.html.gz b/gems/dry-initializer/main/attributes/index.html.gz
index 7238358355..be10cf7a2a 100644
Binary files a/gems/dry-initializer/main/attributes/index.html.gz and b/gems/dry-initializer/main/attributes/index.html.gz differ
diff --git a/gems/dry-initializer/main/container-version/index.html b/gems/dry-initializer/main/container-version/index.html
index e29b362d0e..ef9f59e809 100644
--- a/gems/dry-initializer/main/container-version/index.html
+++ b/gems/dry-initializer/main/container-version/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

dry-initializer main

Container Version

Instead of extending a class with the Dry::Initializer, you can include a container with the initializer method only. This method should be preferred when you don't need subclassing.

+});

dry-initializer main

Container Version

Instead of extending a class with the Dry::Initializer, you can include a container with the initializer method only. This method should be preferred when you don't need subclassing.

require 'dry-initializer'
 
 class User
diff --git a/gems/dry-initializer/main/container-version/index.html.gz b/gems/dry-initializer/main/container-version/index.html.gz
index 5255544369..bbcf76fbab 100644
Binary files a/gems/dry-initializer/main/container-version/index.html.gz and b/gems/dry-initializer/main/container-version/index.html.gz differ
diff --git a/gems/dry-initializer/main/index.html b/gems/dry-initializer/main/index.html
index 714b0fd5d2..baf5d8d85e 100644
--- a/gems/dry-initializer/main/index.html
+++ b/gems/dry-initializer/main/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

dry-initializer main

dry-initializer main

dry-initializer main

dry-initializer main

Inheritance

Subclassing preserves all definitions being made inside a superclass.

require 'dry-initializer'
 
 class User
diff --git a/gems/dry-initializer/main/inheritance/index.html.gz b/gems/dry-initializer/main/inheritance/index.html.gz
index c416508890..02a4b68fc0 100644
Binary files a/gems/dry-initializer/main/inheritance/index.html.gz and b/gems/dry-initializer/main/inheritance/index.html.gz differ
diff --git a/gems/dry-initializer/main/optionals-and-defaults/index.html b/gems/dry-initializer/main/optionals-and-defaults/index.html
index 07cad657db..f9235bab80 100644
--- a/gems/dry-initializer/main/optionals-and-defaults/index.html
+++ b/gems/dry-initializer/main/optionals-and-defaults/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

dry-initializer main

Optional Attributes and Default Values

By default both params and options are mandatory. Use :default key to make them optional:

+});

dry-initializer main

Optional Attributes and Default Values

By default both params and options are mandatory. Use :default key to make them optional:

require 'dry-initializer'
 
 class User
diff --git a/gems/dry-initializer/main/optionals-and-defaults/index.html.gz b/gems/dry-initializer/main/optionals-and-defaults/index.html.gz
index 3ad7e7cf26..474a1606ff 100644
Binary files a/gems/dry-initializer/main/optionals-and-defaults/index.html.gz and b/gems/dry-initializer/main/optionals-and-defaults/index.html.gz differ
diff --git a/gems/dry-initializer/main/params-and-options/index.html b/gems/dry-initializer/main/params-and-options/index.html
index 19573fb71c..8867907b39 100644
--- a/gems/dry-initializer/main/params-and-options/index.html
+++ b/gems/dry-initializer/main/params-and-options/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

dry-initializer main

dry-initializer main

Params and Options

Use param to define plain argument:

require 'dry-initializer'
 
 class User
diff --git a/gems/dry-initializer/main/params-and-options/index.html.gz b/gems/dry-initializer/main/params-and-options/index.html.gz
index 9454865b7d..e2ad8003ac 100644
Binary files a/gems/dry-initializer/main/params-and-options/index.html.gz and b/gems/dry-initializer/main/params-and-options/index.html.gz differ
diff --git a/gems/dry-initializer/main/rails-support/index.html b/gems/dry-initializer/main/rails-support/index.html
index c0fc80358c..d657854f53 100644
--- a/gems/dry-initializer/main/rails-support/index.html
+++ b/gems/dry-initializer/main/rails-support/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

dry-initializer main

dry-initializer main

dry-initializer main

dry-initializer main

Readers

By default public attribute reader is defined for every param and option.

You can define private or protected reader instead:

require 'dry-initializer'
diff --git a/gems/dry-initializer/main/readers/index.html.gz b/gems/dry-initializer/main/readers/index.html.gz
index 641447b64d..0719ceed61 100644
Binary files a/gems/dry-initializer/main/readers/index.html.gz and b/gems/dry-initializer/main/readers/index.html.gz differ
diff --git a/gems/dry-initializer/main/skip-undefined/index.html b/gems/dry-initializer/main/skip-undefined/index.html
index b066d624fa..3b5781322a 100644
--- a/gems/dry-initializer/main/skip-undefined/index.html
+++ b/gems/dry-initializer/main/skip-undefined/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

dry-initializer main

Skip Undefined

The initializer uses special constant Dry::Initializer::UNDEFINED to distinguish variables that are set to nil from those that are not set at all.

+});

dry-initializer main

Skip Undefined

The initializer uses special constant Dry::Initializer::UNDEFINED to distinguish variables that are set to nil from those that are not set at all.

When no value was provided, the constant is assigned to a variable, but hidden in a reader.

require 'dry-initializer'
diff --git a/gems/dry-initializer/main/skip-undefined/index.html.gz b/gems/dry-initializer/main/skip-undefined/index.html.gz
index 93e02df359..76c8118d14 100644
Binary files a/gems/dry-initializer/main/skip-undefined/index.html.gz and b/gems/dry-initializer/main/skip-undefined/index.html.gz differ
diff --git a/gems/dry-initializer/main/tolerance-to-unknown-arguments/index.html b/gems/dry-initializer/main/tolerance-to-unknown-arguments/index.html
index 93e75a3d30..ddbfd48e38 100644
--- a/gems/dry-initializer/main/tolerance-to-unknown-arguments/index.html
+++ b/gems/dry-initializer/main/tolerance-to-unknown-arguments/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

dry-initializer main

Tolerance to Unknown Arguments

By default the initializer is tolerant for both params (positional arguments) and options. +});

dry-initializer main

Tolerance to Unknown Arguments

By default the initializer is tolerant for both params (positional arguments) and options. All unknown arguments of the initializer are ignored silently.

require 'dry-initializer'
 
diff --git a/gems/dry-initializer/main/tolerance-to-unknown-arguments/index.html.gz b/gems/dry-initializer/main/tolerance-to-unknown-arguments/index.html.gz
index 09453e9a26..b32573af38 100644
Binary files a/gems/dry-initializer/main/tolerance-to-unknown-arguments/index.html.gz and b/gems/dry-initializer/main/tolerance-to-unknown-arguments/index.html.gz differ
diff --git a/gems/dry-initializer/main/type-constraints/index.html b/gems/dry-initializer/main/type-constraints/index.html
index f74702895e..1ef4ac449e 100644
--- a/gems/dry-initializer/main/type-constraints/index.html
+++ b/gems/dry-initializer/main/type-constraints/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

dry-initializer main

dry-initializer main

Type Constraints

Base Syntax

diff --git a/gems/dry-initializer/main/type-constraints/index.html.gz b/gems/dry-initializer/main/type-constraints/index.html.gz index bdb039bc78..1cf99069f9 100644 Binary files a/gems/dry-initializer/main/type-constraints/index.html.gz and b/gems/dry-initializer/main/type-constraints/index.html.gz differ diff --git a/gems/dry-logger/1.0/index.html.gz b/gems/dry-logger/1.0/index.html.gz index ad95b66779..839444ecbf 100644 Binary files a/gems/dry-logger/1.0/index.html.gz and b/gems/dry-logger/1.0/index.html.gz differ diff --git a/gems/dry-logger/index.html.gz b/gems/dry-logger/index.html.gz index c78c6597b0..129257418b 100644 Binary files a/gems/dry-logger/index.html.gz and b/gems/dry-logger/index.html.gz differ diff --git a/gems/dry-logger/main/index.html.gz b/gems/dry-logger/main/index.html.gz index 8d727035b8..e7ec8f4d4b 100644 Binary files a/gems/dry-logger/main/index.html.gz and b/gems/dry-logger/main/index.html.gz differ diff --git a/gems/dry-logic/1.0/index.html b/gems/dry-logic/1.0/index.html index b694b55b27..7849e7160d 100644 --- a/gems/dry-logic/1.0/index.html +++ b/gems/dry-logic/1.0/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

Predicate logic and rule composition used by:

+});

Introduction

Predicate logic and rule composition used by:

  • dry-types for constrained types
  • diff --git a/gems/dry-logic/1.0/index.html.gz b/gems/dry-logic/1.0/index.html.gz index bdbfd4cf77..ce9769c023 100644 Binary files a/gems/dry-logic/1.0/index.html.gz and b/gems/dry-logic/1.0/index.html.gz differ diff --git a/gems/dry-logic/1.0/operations/index.html b/gems/dry-logic/1.0/operations/index.html index 05cc2bffd0..644814481a 100644 --- a/gems/dry-logic/1.0/operations/index.html +++ b/gems/dry-logic/1.0/operations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Operations

Dry-logic uses operations to interact with the input passed to the different rules.

+});

Operations

Dry-logic uses operations to interact with the input passed to the different rules.

require 'dry/logic'
 require 'dry/logic/predicates'
 
diff --git a/gems/dry-logic/1.0/operations/index.html.gz b/gems/dry-logic/1.0/operations/index.html.gz
index 10a1ceadc4..d35f9e79e4 100644
Binary files a/gems/dry-logic/1.0/operations/index.html.gz and b/gems/dry-logic/1.0/operations/index.html.gz differ
diff --git a/gems/dry-logic/1.0/predicates/index.html b/gems/dry-logic/1.0/predicates/index.html
index 8b85a3840d..12b7233383 100644
--- a/gems/dry-logic/1.0/predicates/index.html
+++ b/gems/dry-logic/1.0/predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Predicates

Dry-logic comes with a lot predicates to compose multiple rules:

+});

Predicates

Dry-logic comes with a lot predicates to compose multiple rules:

require 'dry/logic'
 require 'dry/logic/predicates'
 
diff --git a/gems/dry-logic/1.0/predicates/index.html.gz b/gems/dry-logic/1.0/predicates/index.html.gz
index 43ae67e1f3..48b9c5e194 100644
Binary files a/gems/dry-logic/1.0/predicates/index.html.gz and b/gems/dry-logic/1.0/predicates/index.html.gz differ
diff --git a/gems/dry-logic/1.1/index.html b/gems/dry-logic/1.1/index.html
index 78c0ad7bd5..d6dc9e00fa 100644
--- a/gems/dry-logic/1.1/index.html
+++ b/gems/dry-logic/1.1/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

Predicate logic and rule composition used by:

+});

Introduction

Predicate logic and rule composition used by:

  • dry-types for constrained types
  • diff --git a/gems/dry-logic/1.1/index.html.gz b/gems/dry-logic/1.1/index.html.gz index aa72577d08..a4aec8a7a3 100644 Binary files a/gems/dry-logic/1.1/index.html.gz and b/gems/dry-logic/1.1/index.html.gz differ diff --git a/gems/dry-logic/1.1/operations/index.html b/gems/dry-logic/1.1/operations/index.html index 309145deb7..af1c90fb1b 100644 --- a/gems/dry-logic/1.1/operations/index.html +++ b/gems/dry-logic/1.1/operations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Operations

Dry-logic uses operations to interact with the input passed to the different rules.

+});

Operations

Dry-logic uses operations to interact with the input passed to the different rules.

require 'dry/logic'
 require 'dry/logic/predicates'
 
diff --git a/gems/dry-logic/1.1/operations/index.html.gz b/gems/dry-logic/1.1/operations/index.html.gz
index c454091047..103f379763 100644
Binary files a/gems/dry-logic/1.1/operations/index.html.gz and b/gems/dry-logic/1.1/operations/index.html.gz differ
diff --git a/gems/dry-logic/1.1/predicates/index.html b/gems/dry-logic/1.1/predicates/index.html
index 953bfa15bd..2a7958c214 100644
--- a/gems/dry-logic/1.1/predicates/index.html
+++ b/gems/dry-logic/1.1/predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Predicates

Dry-logic comes with a lot predicates to compose multiple rules:

+});

Predicates

Dry-logic comes with a lot predicates to compose multiple rules:

require 'dry/logic'
 require 'dry/logic/predicates'
 
diff --git a/gems/dry-logic/1.1/predicates/index.html.gz b/gems/dry-logic/1.1/predicates/index.html.gz
index 04314c3f74..1fde809037 100644
Binary files a/gems/dry-logic/1.1/predicates/index.html.gz and b/gems/dry-logic/1.1/predicates/index.html.gz differ
diff --git a/gems/dry-logic/1.2/builder/index.html b/gems/dry-logic/1.2/builder/index.html
index c5af242105..b659b87764 100644
--- a/gems/dry-logic/1.2/builder/index.html
+++ b/gems/dry-logic/1.2/builder/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Builder

Use Dry Logic's builder evaluate predicates and operations

+});

Builder

Use Dry Logic's builder evaluate predicates and operations

require "dry/logic/builder"
 
 is_zero = Dry::Logic::Builder.call do
diff --git a/gems/dry-logic/1.2/builder/index.html.gz b/gems/dry-logic/1.2/builder/index.html.gz
index ba14ce6937..9b8af1dd37 100644
Binary files a/gems/dry-logic/1.2/builder/index.html.gz and b/gems/dry-logic/1.2/builder/index.html.gz differ
diff --git a/gems/dry-logic/1.2/custom-predicates/index.html b/gems/dry-logic/1.2/custom-predicates/index.html
index ee1addc826..900db180ac 100644
--- a/gems/dry-logic/1.2/custom-predicates/index.html
+++ b/gems/dry-logic/1.2/custom-predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Custom predicates

Define custom predicates using the predicate method. Use the build in builder to evaluate and define your predicate.

+});

Custom predicates

Define custom predicates using the predicate method. Use the build in builder to evaluate and define your predicate.

extend Dry::Logic::Builder
 
 build do
diff --git a/gems/dry-logic/1.2/custom-predicates/index.html.gz b/gems/dry-logic/1.2/custom-predicates/index.html.gz
index e7109d14f1..db2baa9d2f 100644
Binary files a/gems/dry-logic/1.2/custom-predicates/index.html.gz and b/gems/dry-logic/1.2/custom-predicates/index.html.gz differ
diff --git a/gems/dry-logic/1.2/index.html b/gems/dry-logic/1.2/index.html
index dca6ce3019..77adc7acf5 100644
--- a/gems/dry-logic/1.2/index.html
+++ b/gems/dry-logic/1.2/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

Predicate logic and rule composition used by:

+});

Introduction

Predicate logic and rule composition used by:

  • dry-types for constrained types
  • diff --git a/gems/dry-logic/1.2/index.html.gz b/gems/dry-logic/1.2/index.html.gz index 643a287769..c5c219acef 100644 Binary files a/gems/dry-logic/1.2/index.html.gz and b/gems/dry-logic/1.2/index.html.gz differ diff --git a/gems/dry-logic/1.2/operations/index.html b/gems/dry-logic/1.2/operations/index.html index 03cbe2202e..79c6aa97fd 100644 --- a/gems/dry-logic/1.2/operations/index.html +++ b/gems/dry-logic/1.2/operations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Operations

Operations work on one or more predicates (see predicates) and can be invoked in conjunction with other operations. Use Dry::Logic::Builder to evaluate operations & predicates.

+});

Operations

Operations work on one or more predicates (see predicates) and can be invoked in conjunction with other operations. Use Dry::Logic::Builder to evaluate operations & predicates.

extend Dry::Logic::Builder
 
 is_zero = build { eql?(0) }
diff --git a/gems/dry-logic/1.2/operations/index.html.gz b/gems/dry-logic/1.2/operations/index.html.gz
index ab2ababde4..8c74b57087 100644
Binary files a/gems/dry-logic/1.2/operations/index.html.gz and b/gems/dry-logic/1.2/operations/index.html.gz differ
diff --git a/gems/dry-logic/1.2/predicates/index.html b/gems/dry-logic/1.2/predicates/index.html
index c9ccf6cccf..0822e7df9f 100644
--- a/gems/dry-logic/1.2/predicates/index.html
+++ b/gems/dry-logic/1.2/predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Predicates

Predicates can be chained together using operations such as & and | (see the operations section). Take a look at the builder section on how to run the below examples using Dry Logic's builder.

+});

Builder

Use Dry Logic's builder evaluate predicates and operations

+});

Builder

Use Dry Logic's builder evaluate predicates and operations

require "dry/logic/builder"
 
 is_zero = Dry::Logic::Builder.call do
diff --git a/gems/dry-logic/1.3/builder/index.html.gz b/gems/dry-logic/1.3/builder/index.html.gz
index f352647b0a..6e72524554 100644
Binary files a/gems/dry-logic/1.3/builder/index.html.gz and b/gems/dry-logic/1.3/builder/index.html.gz differ
diff --git a/gems/dry-logic/1.3/custom-predicates/index.html b/gems/dry-logic/1.3/custom-predicates/index.html
index 28da6f4a90..2fa8451664 100644
--- a/gems/dry-logic/1.3/custom-predicates/index.html
+++ b/gems/dry-logic/1.3/custom-predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Custom predicates

Define custom predicates using the predicate method. Use the build in builder to evaluate and define your predicate.

+});

Custom predicates

Define custom predicates using the predicate method. Use the build in builder to evaluate and define your predicate.

extend Dry::Logic::Builder
 
 build do
diff --git a/gems/dry-logic/1.3/custom-predicates/index.html.gz b/gems/dry-logic/1.3/custom-predicates/index.html.gz
index e38c41bad5..eb8250b7ea 100644
Binary files a/gems/dry-logic/1.3/custom-predicates/index.html.gz and b/gems/dry-logic/1.3/custom-predicates/index.html.gz differ
diff --git a/gems/dry-logic/1.3/index.html b/gems/dry-logic/1.3/index.html
index 1a5760cd50..84e46acde5 100644
--- a/gems/dry-logic/1.3/index.html
+++ b/gems/dry-logic/1.3/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

Predicate logic and rule composition used by:

+});

Introduction

Predicate logic and rule composition used by:

  • dry-types for constrained types
  • diff --git a/gems/dry-logic/1.3/index.html.gz b/gems/dry-logic/1.3/index.html.gz index 8f3b8b8a8e..eba24e4ec2 100644 Binary files a/gems/dry-logic/1.3/index.html.gz and b/gems/dry-logic/1.3/index.html.gz differ diff --git a/gems/dry-logic/1.3/operations/index.html b/gems/dry-logic/1.3/operations/index.html index 8e7a9a0254..7cb0c856a0 100644 --- a/gems/dry-logic/1.3/operations/index.html +++ b/gems/dry-logic/1.3/operations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Operations

Operations work on one or more predicates (see predicates) and can be invoked in conjunction with other operations. Use Dry::Logic::Builder to evaluate operations & predicates.

+});

Operations

Operations work on one or more predicates (see predicates) and can be invoked in conjunction with other operations. Use Dry::Logic::Builder to evaluate operations & predicates.

extend Dry::Logic::Builder
 
 is_zero = build { eql?(0) }
diff --git a/gems/dry-logic/1.3/operations/index.html.gz b/gems/dry-logic/1.3/operations/index.html.gz
index 6ddd278a51..0fc0beaf47 100644
Binary files a/gems/dry-logic/1.3/operations/index.html.gz and b/gems/dry-logic/1.3/operations/index.html.gz differ
diff --git a/gems/dry-logic/1.3/predicates/index.html b/gems/dry-logic/1.3/predicates/index.html
index 1d20925aa9..b1f80d420d 100644
--- a/gems/dry-logic/1.3/predicates/index.html
+++ b/gems/dry-logic/1.3/predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Predicates

Predicates can be chained together using operations such as & and | (see the operations section). Take a look at the builder section on how to run the below examples using Dry Logic's builder.

+});

Builder

Use Dry Logic's builder evaluate predicates and operations

+});

Builder

Use Dry Logic's builder evaluate predicates and operations

require "dry/logic/builder"
 
 is_zero = Dry::Logic::Builder.call do
diff --git a/gems/dry-logic/1.4/builder/index.html.gz b/gems/dry-logic/1.4/builder/index.html.gz
index 572277a70c..0bcd9c40f8 100644
Binary files a/gems/dry-logic/1.4/builder/index.html.gz and b/gems/dry-logic/1.4/builder/index.html.gz differ
diff --git a/gems/dry-logic/1.4/custom-predicates/index.html b/gems/dry-logic/1.4/custom-predicates/index.html
index 05dfd02ee7..4f59a80e63 100644
--- a/gems/dry-logic/1.4/custom-predicates/index.html
+++ b/gems/dry-logic/1.4/custom-predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Custom predicates

Define custom predicates using the predicate method. Use the build in builder to evaluate and define your predicate.

+});

Custom predicates

Define custom predicates using the predicate method. Use the build in builder to evaluate and define your predicate.

extend Dry::Logic::Builder
 
 build do
diff --git a/gems/dry-logic/1.4/custom-predicates/index.html.gz b/gems/dry-logic/1.4/custom-predicates/index.html.gz
index e74b612ea6..62cd736807 100644
Binary files a/gems/dry-logic/1.4/custom-predicates/index.html.gz and b/gems/dry-logic/1.4/custom-predicates/index.html.gz differ
diff --git a/gems/dry-logic/1.4/index.html b/gems/dry-logic/1.4/index.html
index 4795eed339..5e4e52edfe 100644
--- a/gems/dry-logic/1.4/index.html
+++ b/gems/dry-logic/1.4/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

Predicate logic and rule composition used by:

+});

Introduction

Predicate logic and rule composition used by:

  • dry-types for constrained types
  • diff --git a/gems/dry-logic/1.4/index.html.gz b/gems/dry-logic/1.4/index.html.gz index 247240e1c1..c323c017d1 100644 Binary files a/gems/dry-logic/1.4/index.html.gz and b/gems/dry-logic/1.4/index.html.gz differ diff --git a/gems/dry-logic/1.4/operations/index.html b/gems/dry-logic/1.4/operations/index.html index d5b28c7b97..f57badaf4f 100644 --- a/gems/dry-logic/1.4/operations/index.html +++ b/gems/dry-logic/1.4/operations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Operations

Operations work on one or more predicates (see predicates) and can be invoked in conjunction with other operations. Use Dry::Logic::Builder to evaluate operations & predicates.

+});

Operations

Operations work on one or more predicates (see predicates) and can be invoked in conjunction with other operations. Use Dry::Logic::Builder to evaluate operations & predicates.

extend Dry::Logic::Builder
 
 is_zero = build { eql?(0) }
diff --git a/gems/dry-logic/1.4/operations/index.html.gz b/gems/dry-logic/1.4/operations/index.html.gz
index d22510cf11..2bf6bea983 100644
Binary files a/gems/dry-logic/1.4/operations/index.html.gz and b/gems/dry-logic/1.4/operations/index.html.gz differ
diff --git a/gems/dry-logic/1.4/predicates/index.html b/gems/dry-logic/1.4/predicates/index.html
index 4389a3d219..fcafc11c3a 100644
--- a/gems/dry-logic/1.4/predicates/index.html
+++ b/gems/dry-logic/1.4/predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Predicates

Predicates can be chained together using operations such as & and | (see the operations section). Take a look at the builder section on how to run the below examples using Dry Logic's builder.

+});

Builder

Use Dry Logic's builder evaluate predicates and operations

+});

Builder

Use Dry Logic's builder evaluate predicates and operations

require "dry/logic/builder"
 
 is_zero = Dry::Logic::Builder.call do
diff --git a/gems/dry-logic/1.5/builder/index.html.gz b/gems/dry-logic/1.5/builder/index.html.gz
index 310ad859b7..5bea1bd587 100644
Binary files a/gems/dry-logic/1.5/builder/index.html.gz and b/gems/dry-logic/1.5/builder/index.html.gz differ
diff --git a/gems/dry-logic/1.5/custom-predicates/index.html b/gems/dry-logic/1.5/custom-predicates/index.html
index a2bf8e5121..6ea2c39242 100644
--- a/gems/dry-logic/1.5/custom-predicates/index.html
+++ b/gems/dry-logic/1.5/custom-predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Custom predicates

Define custom predicates using the predicate method. Use the build in builder to evaluate and define your predicate.

+});

Custom predicates

Define custom predicates using the predicate method. Use the build in builder to evaluate and define your predicate.

extend Dry::Logic::Builder
 
 build do
diff --git a/gems/dry-logic/1.5/custom-predicates/index.html.gz b/gems/dry-logic/1.5/custom-predicates/index.html.gz
index 3d8e028df7..626d6b9d09 100644
Binary files a/gems/dry-logic/1.5/custom-predicates/index.html.gz and b/gems/dry-logic/1.5/custom-predicates/index.html.gz differ
diff --git a/gems/dry-logic/1.5/index.html b/gems/dry-logic/1.5/index.html
index dfcb92e693..af22343716 100644
--- a/gems/dry-logic/1.5/index.html
+++ b/gems/dry-logic/1.5/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

Predicate logic and rule composition used by:

+});

Introduction

Predicate logic and rule composition used by:

  • dry-types for constrained types
  • diff --git a/gems/dry-logic/1.5/index.html.gz b/gems/dry-logic/1.5/index.html.gz index 2ed8cdeeac..eaa476b3a4 100644 Binary files a/gems/dry-logic/1.5/index.html.gz and b/gems/dry-logic/1.5/index.html.gz differ diff --git a/gems/dry-logic/1.5/operations/index.html b/gems/dry-logic/1.5/operations/index.html index 8f83d8abe5..af8a7da40a 100644 --- a/gems/dry-logic/1.5/operations/index.html +++ b/gems/dry-logic/1.5/operations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Operations

Operations work on one or more predicates (see predicates) and can be invoked in conjunction with other operations. Use Dry::Logic::Builder to evaluate operations & predicates.

+});

Operations

Operations work on one or more predicates (see predicates) and can be invoked in conjunction with other operations. Use Dry::Logic::Builder to evaluate operations & predicates.

extend Dry::Logic::Builder
 
 is_zero = build { eql?(0) }
diff --git a/gems/dry-logic/1.5/operations/index.html.gz b/gems/dry-logic/1.5/operations/index.html.gz
index 78994a7c68..d2a7c38eb7 100644
Binary files a/gems/dry-logic/1.5/operations/index.html.gz and b/gems/dry-logic/1.5/operations/index.html.gz differ
diff --git a/gems/dry-logic/1.5/predicates/index.html b/gems/dry-logic/1.5/predicates/index.html
index 5c15fb5c09..609b2b7ba6 100644
--- a/gems/dry-logic/1.5/predicates/index.html
+++ b/gems/dry-logic/1.5/predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Predicates

Predicates can be chained together using operations such as & and | (see the operations section). Take a look at the builder section on how to run the below examples using Dry Logic's builder.

+});

Builder

Use Dry Logic's builder evaluate predicates and operations

+});

Builder

Use Dry Logic's builder evaluate predicates and operations

require "dry/logic/builder"
 
 is_zero = Dry::Logic::Builder.call do
diff --git a/gems/dry-logic/main/builder/index.html.gz b/gems/dry-logic/main/builder/index.html.gz
index cbfda8c959..5760a93676 100644
Binary files a/gems/dry-logic/main/builder/index.html.gz and b/gems/dry-logic/main/builder/index.html.gz differ
diff --git a/gems/dry-logic/main/custom-predicates/index.html b/gems/dry-logic/main/custom-predicates/index.html
index b542e94ef4..ebb05882f1 100644
--- a/gems/dry-logic/main/custom-predicates/index.html
+++ b/gems/dry-logic/main/custom-predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Custom predicates

Define custom predicates using the predicate method. Use the build in builder to evaluate and define your predicate.

+});

Custom predicates

Define custom predicates using the predicate method. Use the build in builder to evaluate and define your predicate.

extend Dry::Logic::Builder
 
 build do
diff --git a/gems/dry-logic/main/custom-predicates/index.html.gz b/gems/dry-logic/main/custom-predicates/index.html.gz
index 6d0ff5e763..bb45b0378d 100644
Binary files a/gems/dry-logic/main/custom-predicates/index.html.gz and b/gems/dry-logic/main/custom-predicates/index.html.gz differ
diff --git a/gems/dry-logic/main/index.html b/gems/dry-logic/main/index.html
index 60cafa06bf..905d50505a 100644
--- a/gems/dry-logic/main/index.html
+++ b/gems/dry-logic/main/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

Predicate logic and rule composition used by:

+});

Introduction

Predicate logic and rule composition used by:

  • dry-types for constrained types
  • diff --git a/gems/dry-logic/main/index.html.gz b/gems/dry-logic/main/index.html.gz index c2f8e655a5..af3d3fb197 100644 Binary files a/gems/dry-logic/main/index.html.gz and b/gems/dry-logic/main/index.html.gz differ diff --git a/gems/dry-logic/main/operations/index.html b/gems/dry-logic/main/operations/index.html index 62685a9185..58c8ad3570 100644 --- a/gems/dry-logic/main/operations/index.html +++ b/gems/dry-logic/main/operations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Operations

Operations work on one or more predicates (see predicates) and can be invoked in conjunction with other operations. Use Dry::Logic::Builder to evaluate operations & predicates.

+});

Operations

Operations work on one or more predicates (see predicates) and can be invoked in conjunction with other operations. Use Dry::Logic::Builder to evaluate operations & predicates.

extend Dry::Logic::Builder
 
 is_zero = build { eql?(0) }
diff --git a/gems/dry-logic/main/operations/index.html.gz b/gems/dry-logic/main/operations/index.html.gz
index 8015c9481e..9d95b956c7 100644
Binary files a/gems/dry-logic/main/operations/index.html.gz and b/gems/dry-logic/main/operations/index.html.gz differ
diff --git a/gems/dry-logic/main/predicates/index.html b/gems/dry-logic/main/predicates/index.html
index e6a50b3a43..107f6a9bfc 100644
--- a/gems/dry-logic/main/predicates/index.html
+++ b/gems/dry-logic/main/predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Predicates

Predicates can be chained together using operations such as & and | (see the operations section). Take a look at the builder section on how to run the below examples using Dry Logic's builder.

+});

Class enhancement

You can offer a match block API from your own methods using Dry::Matcher.for:

+});

Class enhancement

You can offer a match block API from your own methods using Dry::Matcher.for:

require "dry-matcher"
 
 # First, build a matcher or use an existing one (like dry-matcher's ResultMatcher)
diff --git a/gems/dry-matcher/0.1/class-enhancement/index.html.gz b/gems/dry-matcher/0.1/class-enhancement/index.html.gz
index 77fcd503be..7866b1a053 100644
Binary files a/gems/dry-matcher/0.1/class-enhancement/index.html.gz and b/gems/dry-matcher/0.1/class-enhancement/index.html.gz differ
diff --git a/gems/dry-matcher/0.1/index.html b/gems/dry-matcher/0.1/index.html
index 1fdd5bd38c..abfc75feda 100644
--- a/gems/dry-matcher/0.1/index.html
+++ b/gems/dry-matcher/0.1/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-matcher offers flexible, expressive pattern matching for Ruby.

+});

Maybe matcher

dry-matcher provides a ready-to-use MaybeMatcher for working with Maybe from dry-monads or any other compatible gems.

+});

Maybe matcher

dry-matcher provides a ready-to-use MaybeMatcher for working with Maybe from dry-monads or any other compatible gems.

require "dry/monads"
 require "dry/matcher/maybe_matcher"
 
diff --git a/gems/dry-matcher/0.1/maybe-matcher/index.html.gz b/gems/dry-matcher/0.1/maybe-matcher/index.html.gz
index 4e4e5128b0..0f9d9169a8 100644
Binary files a/gems/dry-matcher/0.1/maybe-matcher/index.html.gz and b/gems/dry-matcher/0.1/maybe-matcher/index.html.gz differ
diff --git a/gems/dry-matcher/0.1/result-matcher/index.html b/gems/dry-matcher/0.1/result-matcher/index.html
index bfa99ec16d..b93b1d4c83 100644
--- a/gems/dry-matcher/0.1/result-matcher/index.html
+++ b/gems/dry-matcher/0.1/result-matcher/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Result matcher

dry-matcher provides a ready-to-use ResultMatcher for working with Result or Try monads from dry-monads or any other compatible gems.

+});

Result matcher

dry-matcher provides a ready-to-use ResultMatcher for working with Result or Try monads from dry-monads or any other compatible gems.

require "dry/monads"
 require "dry/matcher/result_matcher"
 
diff --git a/gems/dry-matcher/0.1/result-matcher/index.html.gz b/gems/dry-matcher/0.1/result-matcher/index.html.gz
index e8f5ef50b5..3abae258c7 100644
Binary files a/gems/dry-matcher/0.1/result-matcher/index.html.gz and b/gems/dry-matcher/0.1/result-matcher/index.html.gz differ
diff --git a/gems/dry-matcher/0.10/class-enhancement/index.html b/gems/dry-matcher/0.10/class-enhancement/index.html
index 466b18bab9..23bd18164c 100644
--- a/gems/dry-matcher/0.10/class-enhancement/index.html
+++ b/gems/dry-matcher/0.10/class-enhancement/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class enhancement

You can offer a match block API from your own methods using Dry::Matcher.for:

+});

Class enhancement

You can offer a match block API from your own methods using Dry::Matcher.for:

require "dry-matcher"
 
 # First, build a matcher or use an existing one (like dry-matcher's ResultMatcher)
diff --git a/gems/dry-matcher/0.10/class-enhancement/index.html.gz b/gems/dry-matcher/0.10/class-enhancement/index.html.gz
index 26a6eba23a..6c4e78e89d 100644
Binary files a/gems/dry-matcher/0.10/class-enhancement/index.html.gz and b/gems/dry-matcher/0.10/class-enhancement/index.html.gz differ
diff --git a/gems/dry-matcher/0.10/index.html b/gems/dry-matcher/0.10/index.html
index 1e88d838e5..0f83ca4c20 100644
--- a/gems/dry-matcher/0.10/index.html
+++ b/gems/dry-matcher/0.10/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-matcher offers flexible, expressive pattern matching for Ruby.

+});

Maybe matcher

dry-matcher provides a ready-to-use MaybeMatcher for working with Maybe from dry-monads or any other compatible gems.

+});

Maybe matcher

dry-matcher provides a ready-to-use MaybeMatcher for working with Maybe from dry-monads or any other compatible gems.

require "dry/monads"
 require "dry/matcher/maybe_matcher"
 
diff --git a/gems/dry-matcher/0.10/maybe-matcher/index.html.gz b/gems/dry-matcher/0.10/maybe-matcher/index.html.gz
index 83f89e2345..e5b8314dfe 100644
Binary files a/gems/dry-matcher/0.10/maybe-matcher/index.html.gz and b/gems/dry-matcher/0.10/maybe-matcher/index.html.gz differ
diff --git a/gems/dry-matcher/0.10/result-matcher/index.html b/gems/dry-matcher/0.10/result-matcher/index.html
index 85a039b12f..6b1a326ecd 100644
--- a/gems/dry-matcher/0.10/result-matcher/index.html
+++ b/gems/dry-matcher/0.10/result-matcher/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Result matcher

dry-matcher provides a ready-to-use ResultMatcher for working with Result or Try monads from dry-monads or any other compatible gems.

+});

Result matcher

dry-matcher provides a ready-to-use ResultMatcher for working with Result or Try monads from dry-monads or any other compatible gems.

require "dry/monads"
 require "dry/matcher/result_matcher"
 
diff --git a/gems/dry-matcher/0.10/result-matcher/index.html.gz b/gems/dry-matcher/0.10/result-matcher/index.html.gz
index eeceaa124f..d116159652 100644
Binary files a/gems/dry-matcher/0.10/result-matcher/index.html.gz and b/gems/dry-matcher/0.10/result-matcher/index.html.gz differ
diff --git a/gems/dry-matcher/0.7/class-enhancement/index.html b/gems/dry-matcher/0.7/class-enhancement/index.html
index 662024719e..93e6f9ddf8 100644
--- a/gems/dry-matcher/0.7/class-enhancement/index.html
+++ b/gems/dry-matcher/0.7/class-enhancement/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class enhancement

You can offer a match block API from your own methods using Dry::Matcher.for:

+});

Class enhancement

You can offer a match block API from your own methods using Dry::Matcher.for:

require "dry-matcher"
 
 # First, build a matcher or use an existing one (like dry-matcher's ResultMatcher)
diff --git a/gems/dry-matcher/0.7/class-enhancement/index.html.gz b/gems/dry-matcher/0.7/class-enhancement/index.html.gz
index d7fc301aba..201a455ff7 100644
Binary files a/gems/dry-matcher/0.7/class-enhancement/index.html.gz and b/gems/dry-matcher/0.7/class-enhancement/index.html.gz differ
diff --git a/gems/dry-matcher/0.7/index.html b/gems/dry-matcher/0.7/index.html
index 65da9b624a..18446a50a0 100644
--- a/gems/dry-matcher/0.7/index.html
+++ b/gems/dry-matcher/0.7/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-matcher offers flexible, expressive pattern matching for Ruby.

+});

Result matcher

dry-matcher provides a ready-to-use ResultMatcher for working with Result or Try monads from dry-monads or any other compatible gems.

+});

Result matcher

dry-matcher provides a ready-to-use ResultMatcher for working with Result or Try monads from dry-monads or any other compatible gems.

require "dry/monads/result"
 require "dry/matcher/result_matcher"
 
diff --git a/gems/dry-matcher/0.7/result-matcher/index.html.gz b/gems/dry-matcher/0.7/result-matcher/index.html.gz
index f19a4c38dd..093e316a0f 100644
Binary files a/gems/dry-matcher/0.7/result-matcher/index.html.gz and b/gems/dry-matcher/0.7/result-matcher/index.html.gz differ
diff --git a/gems/dry-matcher/0.8/class-enhancement/index.html b/gems/dry-matcher/0.8/class-enhancement/index.html
index 738d570e0f..3fb5f9949a 100644
--- a/gems/dry-matcher/0.8/class-enhancement/index.html
+++ b/gems/dry-matcher/0.8/class-enhancement/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class enhancement

You can offer a match block API from your own methods using Dry::Matcher.for:

+});

Class enhancement

You can offer a match block API from your own methods using Dry::Matcher.for:

require "dry-matcher"
 
 # First, build a matcher or use an existing one (like dry-matcher's ResultMatcher)
diff --git a/gems/dry-matcher/0.8/class-enhancement/index.html.gz b/gems/dry-matcher/0.8/class-enhancement/index.html.gz
index 117aa16373..dede3f7cae 100644
Binary files a/gems/dry-matcher/0.8/class-enhancement/index.html.gz and b/gems/dry-matcher/0.8/class-enhancement/index.html.gz differ
diff --git a/gems/dry-matcher/0.8/index.html b/gems/dry-matcher/0.8/index.html
index 60ff340d18..67155cdac4 100644
--- a/gems/dry-matcher/0.8/index.html
+++ b/gems/dry-matcher/0.8/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-matcher offers flexible, expressive pattern matching for Ruby.

+});

Result matcher

dry-matcher provides a ready-to-use ResultMatcher for working with Result or Try monads from dry-monads or any other compatible gems.

+});

Result matcher

dry-matcher provides a ready-to-use ResultMatcher for working with Result or Try monads from dry-monads or any other compatible gems.

require "dry/monads/result"
 require "dry/matcher/result_matcher"
 
diff --git a/gems/dry-matcher/0.8/result-matcher/index.html.gz b/gems/dry-matcher/0.8/result-matcher/index.html.gz
index 0c56f717c2..ccb2079e5c 100644
Binary files a/gems/dry-matcher/0.8/result-matcher/index.html.gz and b/gems/dry-matcher/0.8/result-matcher/index.html.gz differ
diff --git a/gems/dry-matcher/0.9/class-enhancement/index.html b/gems/dry-matcher/0.9/class-enhancement/index.html
index 3fffcf3940..9a78dc3ff1 100644
--- a/gems/dry-matcher/0.9/class-enhancement/index.html
+++ b/gems/dry-matcher/0.9/class-enhancement/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class enhancement

You can offer a match block API from your own methods using Dry::Matcher.for:

+});

Class enhancement

You can offer a match block API from your own methods using Dry::Matcher.for:

require "dry-matcher"
 
 # First, build a matcher or use an existing one (like dry-matcher's ResultMatcher)
diff --git a/gems/dry-matcher/0.9/class-enhancement/index.html.gz b/gems/dry-matcher/0.9/class-enhancement/index.html.gz
index b19fd7198f..339a190f8c 100644
Binary files a/gems/dry-matcher/0.9/class-enhancement/index.html.gz and b/gems/dry-matcher/0.9/class-enhancement/index.html.gz differ
diff --git a/gems/dry-matcher/0.9/index.html b/gems/dry-matcher/0.9/index.html
index a3e9b650fb..2e97934693 100644
--- a/gems/dry-matcher/0.9/index.html
+++ b/gems/dry-matcher/0.9/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-matcher offers flexible, expressive pattern matching for Ruby.

+});

Result matcher

dry-matcher provides a ready-to-use ResultMatcher for working with Result or Try monads from dry-monads or any other compatible gems.

+});

Result matcher

dry-matcher provides a ready-to-use ResultMatcher for working with Result or Try monads from dry-monads or any other compatible gems.

require "dry/monads/result"
 require "dry/matcher/result_matcher"
 
diff --git a/gems/dry-matcher/0.9/result-matcher/index.html.gz b/gems/dry-matcher/0.9/result-matcher/index.html.gz
index bc36ca12cd..c64c2e104d 100644
Binary files a/gems/dry-matcher/0.9/result-matcher/index.html.gz and b/gems/dry-matcher/0.9/result-matcher/index.html.gz differ
diff --git a/gems/dry-matcher/1.0/class-enhancement/index.html b/gems/dry-matcher/1.0/class-enhancement/index.html
index 93d7a989af..f72659e8ac 100644
--- a/gems/dry-matcher/1.0/class-enhancement/index.html
+++ b/gems/dry-matcher/1.0/class-enhancement/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class enhancement

You can offer a match block API from your own methods using Dry::Matcher.for:

+});

Class enhancement

You can offer a match block API from your own methods using Dry::Matcher.for:

require "dry-matcher"
 
 # First, build a matcher or use an existing one (like dry-matcher's ResultMatcher)
diff --git a/gems/dry-matcher/1.0/class-enhancement/index.html.gz b/gems/dry-matcher/1.0/class-enhancement/index.html.gz
index 8e8a1e44e0..a3bc86d105 100644
Binary files a/gems/dry-matcher/1.0/class-enhancement/index.html.gz and b/gems/dry-matcher/1.0/class-enhancement/index.html.gz differ
diff --git a/gems/dry-matcher/1.0/index.html b/gems/dry-matcher/1.0/index.html
index 32813b58ac..942c02cbad 100644
--- a/gems/dry-matcher/1.0/index.html
+++ b/gems/dry-matcher/1.0/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-matcher offers flexible, expressive pattern matching for Ruby.

+});

Maybe matcher

dry-matcher provides a ready-to-use MaybeMatcher for working with Maybe from dry-monads or any other compatible gems.

+});

Maybe matcher

dry-matcher provides a ready-to-use MaybeMatcher for working with Maybe from dry-monads or any other compatible gems.

require "dry/monads"
 require "dry/matcher/maybe_matcher"
 
diff --git a/gems/dry-matcher/1.0/maybe-matcher/index.html.gz b/gems/dry-matcher/1.0/maybe-matcher/index.html.gz
index 30fae9e8d4..079cd126c6 100644
Binary files a/gems/dry-matcher/1.0/maybe-matcher/index.html.gz and b/gems/dry-matcher/1.0/maybe-matcher/index.html.gz differ
diff --git a/gems/dry-matcher/1.0/result-matcher/index.html b/gems/dry-matcher/1.0/result-matcher/index.html
index 8da0faaea2..f4b17b450c 100644
--- a/gems/dry-matcher/1.0/result-matcher/index.html
+++ b/gems/dry-matcher/1.0/result-matcher/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Result matcher

dry-matcher provides a ready-to-use ResultMatcher for working with Result or Try monads from dry-monads or any other compatible gems.

+});

Result matcher

dry-matcher provides a ready-to-use ResultMatcher for working with Result or Try monads from dry-monads or any other compatible gems.

require "dry/monads"
 require "dry/matcher/result_matcher"
 
diff --git a/gems/dry-matcher/1.0/result-matcher/index.html.gz b/gems/dry-matcher/1.0/result-matcher/index.html.gz
index b055ee22bc..3ee18807e2 100644
Binary files a/gems/dry-matcher/1.0/result-matcher/index.html.gz and b/gems/dry-matcher/1.0/result-matcher/index.html.gz differ
diff --git a/gems/dry-matcher/index.html.gz b/gems/dry-matcher/index.html.gz
index 9f58e81847..3632f9c60f 100644
Binary files a/gems/dry-matcher/index.html.gz and b/gems/dry-matcher/index.html.gz differ
diff --git a/gems/dry-matcher/main/class-enhancement/index.html b/gems/dry-matcher/main/class-enhancement/index.html
index 831bfd7040..a1cc782d6d 100644
--- a/gems/dry-matcher/main/class-enhancement/index.html
+++ b/gems/dry-matcher/main/class-enhancement/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Class enhancement

You can offer a match block API from your own methods using Dry::Matcher.for:

+});

Class enhancement

You can offer a match block API from your own methods using Dry::Matcher.for:

require "dry-matcher"
 
 # First, build a matcher or use an existing one (like dry-matcher's ResultMatcher)
diff --git a/gems/dry-matcher/main/class-enhancement/index.html.gz b/gems/dry-matcher/main/class-enhancement/index.html.gz
index 6c7a87293a..87482a0b59 100644
Binary files a/gems/dry-matcher/main/class-enhancement/index.html.gz and b/gems/dry-matcher/main/class-enhancement/index.html.gz differ
diff --git a/gems/dry-matcher/main/index.html b/gems/dry-matcher/main/index.html
index 1ba40f510a..cfbe823cbc 100644
--- a/gems/dry-matcher/main/index.html
+++ b/gems/dry-matcher/main/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-matcher offers flexible, expressive pattern matching for Ruby.

+});

Maybe matcher

dry-matcher provides a ready-to-use MaybeMatcher for working with Maybe from dry-monads or any other compatible gems.

+});

Maybe matcher

dry-matcher provides a ready-to-use MaybeMatcher for working with Maybe from dry-monads or any other compatible gems.

require "dry/monads"
 require "dry/matcher/maybe_matcher"
 
diff --git a/gems/dry-matcher/main/maybe-matcher/index.html.gz b/gems/dry-matcher/main/maybe-matcher/index.html.gz
index 4de74172a1..315be550bb 100644
Binary files a/gems/dry-matcher/main/maybe-matcher/index.html.gz and b/gems/dry-matcher/main/maybe-matcher/index.html.gz differ
diff --git a/gems/dry-matcher/main/result-matcher/index.html b/gems/dry-matcher/main/result-matcher/index.html
index 2883f517bd..130c867ea1 100644
--- a/gems/dry-matcher/main/result-matcher/index.html
+++ b/gems/dry-matcher/main/result-matcher/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Result matcher

dry-matcher provides a ready-to-use ResultMatcher for working with Result or Try monads from dry-monads or any other compatible gems.

+});

Result matcher

dry-matcher provides a ready-to-use ResultMatcher for working with Result or Try monads from dry-monads or any other compatible gems.

require "dry/monads"
 require "dry/matcher/result_matcher"
 
diff --git a/gems/dry-matcher/main/result-matcher/index.html.gz b/gems/dry-matcher/main/result-matcher/index.html.gz
index e0602cf9aa..64a00f69f6 100644
Binary files a/gems/dry-matcher/main/result-matcher/index.html.gz and b/gems/dry-matcher/main/result-matcher/index.html.gz differ
diff --git a/gems/dry-monads/0.4/index.html b/gems/dry-monads/0.4/index.html
index d22a088a7d..db87431a92 100644
--- a/gems/dry-monads/0.4/index.html
+++ b/gems/dry-monads/0.4/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-monads is a set of common monads for Ruby. +});

Introduction

dry-monads is a set of common monads for Ruby. Monads provide an elegant way of handling errors, exceptions and chaining functions so that the code is much more understandable and has all the error handling, without all the ifs and elses. The gem was inspired by Kleisli gem.

What is a monad, anyway? Simply, a monoid in the category of endofunctors. The term comes from Category Theory and there are beliefs monads are tough to understand or explain. It's hard to say why people think so because you certainly don't need to know Category Theory for using them, just like you don't need it for, say, using functions.

diff --git a/gems/dry-monads/0.4/index.html.gz b/gems/dry-monads/0.4/index.html.gz index 3dedbe3282..cba65b3eb7 100644 Binary files a/gems/dry-monads/0.4/index.html.gz and b/gems/dry-monads/0.4/index.html.gz differ diff --git a/gems/dry-monads/0.4/list/index.html b/gems/dry-monads/0.4/list/index.html index 680aa0d668..5b02e456b4 100644 --- a/gems/dry-monads/0.4/list/index.html +++ b/gems/dry-monads/0.4/list/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

List

bind

diff --git a/gems/dry-monads/0.4/list/index.html.gz b/gems/dry-monads/0.4/list/index.html.gz index 699d80da2c..f53b361e22 100644 Binary files a/gems/dry-monads/0.4/list/index.html.gz and b/gems/dry-monads/0.4/list/index.html.gz differ diff --git a/gems/dry-monads/0.4/maybe/index.html b/gems/dry-monads/0.4/maybe/index.html index 5d51ffbec7..74fb0e7c25 100644 --- a/gems/dry-monads/0.4/maybe/index.html +++ b/gems/dry-monads/0.4/maybe/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Maybe

The Maybe monad is used when a series of computations could return nil at any point.

+});

Result

The Result monad is useful to express a series of computations that might +});

Result

The Result monad is useful to express a series of computations that might return an error object with additional information.

The Result mixin has two type constructors: Success and Failure. The Success diff --git a/gems/dry-monads/0.4/result/index.html.gz b/gems/dry-monads/0.4/result/index.html.gz index 5e77a6da92..6ed3b05848 100644 Binary files a/gems/dry-monads/0.4/result/index.html.gz and b/gems/dry-monads/0.4/result/index.html.gz differ diff --git a/gems/dry-monads/0.4/try/index.html b/gems/dry-monads/0.4/try/index.html index 36d305d4fb..f2d890b444 100644 --- a/gems/dry-monads/0.4/try/index.html +++ b/gems/dry-monads/0.4/try/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Try

Rescues a block from an exception. The Try monad is useful when you want to wrap some code that can raise exceptions of certain types. A common example is making an HTTP request or querying a database.

+});

Try

Rescues a block from an exception. The Try monad is useful when you want to wrap some code that can raise exceptions of certain types. A common example is making an HTTP request or querying a database.

require 'dry-monads'
 
 module ExceptionalLand
diff --git a/gems/dry-monads/0.4/try/index.html.gz b/gems/dry-monads/0.4/try/index.html.gz
index e72481679e..0903b68bd1 100644
Binary files a/gems/dry-monads/0.4/try/index.html.gz and b/gems/dry-monads/0.4/try/index.html.gz differ
diff --git a/gems/dry-monads/1.0/case-equality/index.html b/gems/dry-monads/1.0/case-equality/index.html
index 2959f5bdf9..b9a117255f 100644
--- a/gems/dry-monads/1.0/case-equality/index.html
+++ b/gems/dry-monads/1.0/case-equality/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Case equality

Case equality

diff --git a/gems/dry-monads/1.0/case-equality/index.html.gz b/gems/dry-monads/1.0/case-equality/index.html.gz index ea74e07bc0..37a48379be 100644 Binary files a/gems/dry-monads/1.0/case-equality/index.html.gz and b/gems/dry-monads/1.0/case-equality/index.html.gz differ diff --git a/gems/dry-monads/1.0/do-notation/index.html b/gems/dry-monads/1.0/do-notation/index.html index 2c023404bd..95904d1730 100644 --- a/gems/dry-monads/1.0/do-notation/index.html +++ b/gems/dry-monads/1.0/do-notation/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Do notation

Composing several monadic values can become tedious because you need to pass around unwrapped values in lambdas (aka blocks). Haskell was one of the first languages faced this problem. To work around it Haskell has a special syntax for combining monadic operations called the "do notation". If you're familiar with Scala it has for-comprehensions for a similar purpose. It is not possible to implement do in Ruby but it is possible to emulate it to some extent, i.e. achieve comparable usefulness.

+});

Do notation

Composing several monadic values can become tedious because you need to pass around unwrapped values in lambdas (aka blocks). Haskell was one of the first languages faced this problem. To work around it Haskell has a special syntax for combining monadic operations called the "do notation". If you're familiar with Scala it has for-comprehensions for a similar purpose. It is not possible to implement do in Ruby but it is possible to emulate it to some extent, i.e. achieve comparable usefulness.

What Do does is passing an unwrapping block to certain methods. The block tries to extract the underlying value from a monadic object and either short-circuits the execution (in case of a failure) or returns the unwrapped value back.

diff --git a/gems/dry-monads/1.0/do-notation/index.html.gz b/gems/dry-monads/1.0/do-notation/index.html.gz index 8662a9febe..9ad8504d39 100644 Binary files a/gems/dry-monads/1.0/do-notation/index.html.gz and b/gems/dry-monads/1.0/do-notation/index.html.gz differ diff --git a/gems/dry-monads/1.0/getting-started/index.html b/gems/dry-monads/1.0/getting-started/index.html index a7ab132c87..b83ec69941 100644 --- a/gems/dry-monads/1.0/getting-started/index.html +++ b/gems/dry-monads/1.0/getting-started/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Getting started

Installation

diff --git a/gems/dry-monads/1.0/getting-started/index.html.gz b/gems/dry-monads/1.0/getting-started/index.html.gz index 722978d303..278f1d82e0 100644 Binary files a/gems/dry-monads/1.0/getting-started/index.html.gz and b/gems/dry-monads/1.0/getting-started/index.html.gz differ diff --git a/gems/dry-monads/1.0/index.html b/gems/dry-monads/1.0/index.html index a94004f0a9..5397997a12 100644 --- a/gems/dry-monads/1.0/index.html +++ b/gems/dry-monads/1.0/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-monads is a set of common monads for Ruby. Monads provide an elegant way of handling errors, exceptions and chaining functions so that the code is much more understandable and has all the error handling, without all the ifs and elses. The gem was inspired by the Kleisli gem.

+});

Introduction

dry-monads is a set of common monads for Ruby. Monads provide an elegant way of handling errors, exceptions and chaining functions so that the code is much more understandable and has all the error handling, without all the ifs and elses. The gem was inspired by the Kleisli gem.

What is a monad, anyway? Simply, a monoid in the category of endofunctors. The term comes from category theory and some believe monads are tough to understand or explain. It's hard to say why people think so because you certainly don't need to know category theory for using them, just like you don't need it for, say, using functions.

diff --git a/gems/dry-monads/1.0/index.html.gz b/gems/dry-monads/1.0/index.html.gz index 91e817dc69..c3c866b161 100644 Binary files a/gems/dry-monads/1.0/index.html.gz and b/gems/dry-monads/1.0/index.html.gz differ diff --git a/gems/dry-monads/1.0/list/index.html b/gems/dry-monads/1.0/list/index.html index ff8589aa28..d76bccb1f6 100644 --- a/gems/dry-monads/1.0/list/index.html +++ b/gems/dry-monads/1.0/list/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

List

bind

diff --git a/gems/dry-monads/1.0/list/index.html.gz b/gems/dry-monads/1.0/list/index.html.gz index 6b88b28ae9..066d2b226d 100644 Binary files a/gems/dry-monads/1.0/list/index.html.gz and b/gems/dry-monads/1.0/list/index.html.gz differ diff --git a/gems/dry-monads/1.0/maybe/index.html b/gems/dry-monads/1.0/maybe/index.html index ce56375bdd..e28f985a80 100644 --- a/gems/dry-monads/1.0/maybe/index.html +++ b/gems/dry-monads/1.0/maybe/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Maybe

The Maybe monad is used when a series of computations could return nil at any point.

+});

Pattern matching

Ruby 2.7 introduces pattern matchings, it is nicely supported by dry-monads 1.3+.

+});

Result

The Result monad is useful to express a series of computations that might +});

Result

The Result monad is useful to express a series of computations that might return an error object with additional information.

The Result mixin has two type constructors: Success and Failure. The Success diff --git a/gems/dry-monads/1.0/result/index.html.gz b/gems/dry-monads/1.0/result/index.html.gz index 73e34f2ee6..d42d948e67 100644 Binary files a/gems/dry-monads/1.0/result/index.html.gz and b/gems/dry-monads/1.0/result/index.html.gz differ diff --git a/gems/dry-monads/1.0/task/index.html b/gems/dry-monads/1.0/task/index.html index 3591c730d8..9fa8f791b8 100644 --- a/gems/dry-monads/1.0/task/index.html +++ b/gems/dry-monads/1.0/task/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Task

Task represents an asynchronous computation. It is similar to the IO type in a sense it can be used to wrap side-effectful actions. Tasks are usually run on a thread pool but also can be executed immediately on the current thread. Internally, Task uses Promise from the concurrent-ruby gem, basically it's a thin wrapper with a monadic interface which makes it easily composable with other monads.

+});

Tracing failures

"Left" values of right-biased monads like Maybe and Result (as in, None() and Failure()) ignore blocks passed to fmap and bind. Because of this, these values travel across the application without any modification. If the place where a Failure was constructed is burried somewhere deep in the app or library code it may be pretty hard to find out where exactly the error occurred.

+});

Tracing failures

"Left" values of right-biased monads like Maybe and Result (as in, None() and Failure()) ignore blocks passed to fmap and bind. Because of this, these values travel across the application without any modification. If the place where a Failure was constructed is burried somewhere deep in the app or library code it may be pretty hard to find out where exactly the error occurred.

This is a noticable downside compared to "good" old exceptions. To address it, every Failure(...) and None() value tracks the line where it was created:

# create_user.rb
diff --git a/gems/dry-monads/1.0/tracing-failures/index.html.gz b/gems/dry-monads/1.0/tracing-failures/index.html.gz
index 95d64ad3ab..ddcf83c3ab 100644
Binary files a/gems/dry-monads/1.0/tracing-failures/index.html.gz and b/gems/dry-monads/1.0/tracing-failures/index.html.gz differ
diff --git a/gems/dry-monads/1.0/try/index.html b/gems/dry-monads/1.0/try/index.html
index 399efd7253..28cb5cd6cc 100644
--- a/gems/dry-monads/1.0/try/index.html
+++ b/gems/dry-monads/1.0/try/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Try

Rescues a block from an exception. The Try monad is useful when you want to wrap some code that can raise exceptions of certain types. A common example is making an HTTP request or querying a database.

+});

Try

Rescues a block from an exception. The Try monad is useful when you want to wrap some code that can raise exceptions of certain types. A common example is making an HTTP request or querying a database.

require 'dry/monads'
 
 class ExceptionalLand
diff --git a/gems/dry-monads/1.0/try/index.html.gz b/gems/dry-monads/1.0/try/index.html.gz
index 7d91756e14..95f102279d 100644
Binary files a/gems/dry-monads/1.0/try/index.html.gz and b/gems/dry-monads/1.0/try/index.html.gz differ
diff --git a/gems/dry-monads/1.0/unit/index.html b/gems/dry-monads/1.0/unit/index.html
index 48caf59f72..8c5ecc425c 100644
--- a/gems/dry-monads/1.0/unit/index.html
+++ b/gems/dry-monads/1.0/unit/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Unit

Some constructors do not require you to pass a value. As a default they use Unit, a special singleton value:

+});

Unit

Some constructors do not require you to pass a value. As a default they use Unit, a special singleton value:

extend Dry::Monads[:result]
 
 Success().value! # => Unit
diff --git a/gems/dry-monads/1.0/unit/index.html.gz b/gems/dry-monads/1.0/unit/index.html.gz
index 1fd83732d4..412e2c8ec3 100644
Binary files a/gems/dry-monads/1.0/unit/index.html.gz and b/gems/dry-monads/1.0/unit/index.html.gz differ
diff --git a/gems/dry-monads/1.0/validated/index.html b/gems/dry-monads/1.0/validated/index.html
index 65beffb130..1e3cd7bc89 100644
--- a/gems/dry-monads/1.0/validated/index.html
+++ b/gems/dry-monads/1.0/validated/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Validated

Suppose you've got a form to validate. If you are using Result combined with Do your code might look like this:

+});

Validated

Suppose you've got a form to validate. If you are using Result combined with Do your code might look like this:

require 'dry/monads'
 
 class CreateAccount
diff --git a/gems/dry-monads/1.0/validated/index.html.gz b/gems/dry-monads/1.0/validated/index.html.gz
index 2118d32993..fa3b0c1302 100644
Binary files a/gems/dry-monads/1.0/validated/index.html.gz and b/gems/dry-monads/1.0/validated/index.html.gz differ
diff --git a/gems/dry-monads/1.3/case-equality/index.html b/gems/dry-monads/1.3/case-equality/index.html
index 3706b526cc..9d4e8ff4a2 100644
--- a/gems/dry-monads/1.3/case-equality/index.html
+++ b/gems/dry-monads/1.3/case-equality/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Case equality

Case equality

diff --git a/gems/dry-monads/1.3/case-equality/index.html.gz b/gems/dry-monads/1.3/case-equality/index.html.gz index 47b2f0d4d7..bf0551fe85 100644 Binary files a/gems/dry-monads/1.3/case-equality/index.html.gz and b/gems/dry-monads/1.3/case-equality/index.html.gz differ diff --git a/gems/dry-monads/1.3/do-notation/index.html b/gems/dry-monads/1.3/do-notation/index.html index f53c55da14..ea0301304b 100644 --- a/gems/dry-monads/1.3/do-notation/index.html +++ b/gems/dry-monads/1.3/do-notation/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Do notation

Composing several monadic values can become tedious because you need to pass around unwrapped values in lambdas (aka blocks). Haskell was one of the first languages faced this problem. To work around it Haskell has a special syntax for combining monadic operations called the "do notation". If you're familiar with Scala it has for-comprehensions for a similar purpose. It is not possible to implement do in Ruby but it is possible to emulate it to some extent, i.e. achieve comparable usefulness.

+});

Do notation

Composing several monadic values can become tedious because you need to pass around unwrapped values in lambdas (aka blocks). Haskell was one of the first languages faced this problem. To work around it Haskell has a special syntax for combining monadic operations called the "do notation". If you're familiar with Scala it has for-comprehensions for a similar purpose. It is not possible to implement do in Ruby but it is possible to emulate it to some extent, i.e. achieve comparable usefulness.

What Do does is passing an unwrapping block to certain methods. The block tries to extract the underlying value from a monadic object and either short-circuits the execution (in case of a failure) or returns the unwrapped value back.

diff --git a/gems/dry-monads/1.3/do-notation/index.html.gz b/gems/dry-monads/1.3/do-notation/index.html.gz index 1e880acb19..c8fdb393fd 100644 Binary files a/gems/dry-monads/1.3/do-notation/index.html.gz and b/gems/dry-monads/1.3/do-notation/index.html.gz differ diff --git a/gems/dry-monads/1.3/getting-started/index.html b/gems/dry-monads/1.3/getting-started/index.html index 4be16e5090..52fbb80374 100644 --- a/gems/dry-monads/1.3/getting-started/index.html +++ b/gems/dry-monads/1.3/getting-started/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Getting started

Installation

diff --git a/gems/dry-monads/1.3/getting-started/index.html.gz b/gems/dry-monads/1.3/getting-started/index.html.gz index e3e41d70f1..fba71d4d50 100644 Binary files a/gems/dry-monads/1.3/getting-started/index.html.gz and b/gems/dry-monads/1.3/getting-started/index.html.gz differ diff --git a/gems/dry-monads/1.3/index.html b/gems/dry-monads/1.3/index.html index 4613a108e2..4a60865c86 100644 --- a/gems/dry-monads/1.3/index.html +++ b/gems/dry-monads/1.3/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-monads is a set of common monads for Ruby. Monads provide an elegant way of handling errors, exceptions and chaining functions so that the code is much more understandable and has all the error handling, without all the ifs and elses. The gem was inspired by the Kleisli gem.

+});

Introduction

dry-monads is a set of common monads for Ruby. Monads provide an elegant way of handling errors, exceptions and chaining functions so that the code is much more understandable and has all the error handling, without all the ifs and elses. The gem was inspired by the Kleisli gem.

What is a monad, anyway? Simply, a monoid in the category of endofunctors. The term comes from category theory and some believe monads are tough to understand or explain. It's hard to say why people think so because you certainly don't need to know category theory for using them, just like you don't need it for, say, using functions.

diff --git a/gems/dry-monads/1.3/index.html.gz b/gems/dry-monads/1.3/index.html.gz index 0621f9afe9..a84d12b0c3 100644 Binary files a/gems/dry-monads/1.3/index.html.gz and b/gems/dry-monads/1.3/index.html.gz differ diff --git a/gems/dry-monads/1.3/list/index.html b/gems/dry-monads/1.3/list/index.html index ea999e8ade..5952ed382b 100644 --- a/gems/dry-monads/1.3/list/index.html +++ b/gems/dry-monads/1.3/list/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

List

bind

diff --git a/gems/dry-monads/1.3/list/index.html.gz b/gems/dry-monads/1.3/list/index.html.gz index 7ac1b91e94..69a77b6a4d 100644 Binary files a/gems/dry-monads/1.3/list/index.html.gz and b/gems/dry-monads/1.3/list/index.html.gz differ diff --git a/gems/dry-monads/1.3/maybe/index.html b/gems/dry-monads/1.3/maybe/index.html index dc70d2a328..330a206ef5 100644 --- a/gems/dry-monads/1.3/maybe/index.html +++ b/gems/dry-monads/1.3/maybe/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Maybe

The Maybe monad is used when a series of computations could return nil at any point.

+});

Pattern matching

Ruby 2.7 introduces pattern matching, it is nicely supported by dry-monads 1.3+.

+});

Result

The Result monad is useful to express a series of computations that might +});

Result

The Result monad is useful to express a series of computations that might return an error object with additional information.

The Result mixin has two type constructors: Success and Failure. The Success diff --git a/gems/dry-monads/1.3/result/index.html.gz b/gems/dry-monads/1.3/result/index.html.gz index 3c15e06291..baea9fc76f 100644 Binary files a/gems/dry-monads/1.3/result/index.html.gz and b/gems/dry-monads/1.3/result/index.html.gz differ diff --git a/gems/dry-monads/1.3/task/index.html b/gems/dry-monads/1.3/task/index.html index 74421a9795..18b5271dd7 100644 --- a/gems/dry-monads/1.3/task/index.html +++ b/gems/dry-monads/1.3/task/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Task

Task represents an asynchronous computation. It is similar to the IO type in a sense it can be used to wrap side-effectful actions. Tasks are usually run on a thread pool but also can be executed immediately on the current thread. Internally, Task uses Promise from the concurrent-ruby gem, basically it's a thin wrapper with a monadic interface which makes it easily composable with other monads.

+});

Tracing failures

"Left" values of right-biased monads like Maybe and Result (as in, None() and Failure()) ignore blocks passed to fmap and bind. Because of this, these values travel across the application without any modification. If the place where a Failure was constructed is burried somewhere deep in the app or library code it may be pretty hard to find out where exactly the error occurred.

+});

Tracing failures

"Left" values of right-biased monads like Maybe and Result (as in, None() and Failure()) ignore blocks passed to fmap and bind. Because of this, these values travel across the application without any modification. If the place where a Failure was constructed is burried somewhere deep in the app or library code it may be pretty hard to find out where exactly the error occurred.

This is a noticable downside compared to "good" old exceptions. To address it, every Failure(...) and None() value tracks the line where it was created:

# create_user.rb
diff --git a/gems/dry-monads/1.3/tracing-failures/index.html.gz b/gems/dry-monads/1.3/tracing-failures/index.html.gz
index 166e59e24c..592221f874 100644
Binary files a/gems/dry-monads/1.3/tracing-failures/index.html.gz and b/gems/dry-monads/1.3/tracing-failures/index.html.gz differ
diff --git a/gems/dry-monads/1.3/try/index.html b/gems/dry-monads/1.3/try/index.html
index d492ce1d2d..2ac0195f90 100644
--- a/gems/dry-monads/1.3/try/index.html
+++ b/gems/dry-monads/1.3/try/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Try

Rescues a block from an exception. The Try monad is useful when you want to wrap some code that can raise exceptions of certain types. A common example is making an HTTP request or querying a database.

+});

Try

Rescues a block from an exception. The Try monad is useful when you want to wrap some code that can raise exceptions of certain types. A common example is making an HTTP request or querying a database.

require 'dry/monads'
 
 class ExceptionalLand
diff --git a/gems/dry-monads/1.3/try/index.html.gz b/gems/dry-monads/1.3/try/index.html.gz
index cfe3284796..b90c59692f 100644
Binary files a/gems/dry-monads/1.3/try/index.html.gz and b/gems/dry-monads/1.3/try/index.html.gz differ
diff --git a/gems/dry-monads/1.3/unit/index.html b/gems/dry-monads/1.3/unit/index.html
index cebfbafe51..bb31b06723 100644
--- a/gems/dry-monads/1.3/unit/index.html
+++ b/gems/dry-monads/1.3/unit/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Unit

Some constructors do not require you to pass a value. As a default they use Unit, a special singleton value:

+});

Unit

Some constructors do not require you to pass a value. As a default they use Unit, a special singleton value:

extend Dry::Monads[:result]
 
 Success().value! # => Unit
diff --git a/gems/dry-monads/1.3/unit/index.html.gz b/gems/dry-monads/1.3/unit/index.html.gz
index a931e41582..18d00631d0 100644
Binary files a/gems/dry-monads/1.3/unit/index.html.gz and b/gems/dry-monads/1.3/unit/index.html.gz differ
diff --git a/gems/dry-monads/1.3/validated/index.html b/gems/dry-monads/1.3/validated/index.html
index 1e1bf1a1b0..ff59a16b69 100644
--- a/gems/dry-monads/1.3/validated/index.html
+++ b/gems/dry-monads/1.3/validated/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Validated

Suppose you've got a form to validate. If you are using Result combined with Do your code might look like this:

+});

Validated

Suppose you've got a form to validate. If you are using Result combined with Do your code might look like this:

require 'dry/monads'
 
 class CreateAccount
diff --git a/gems/dry-monads/1.3/validated/index.html.gz b/gems/dry-monads/1.3/validated/index.html.gz
index fa3d4a1589..4e28321b17 100644
Binary files a/gems/dry-monads/1.3/validated/index.html.gz and b/gems/dry-monads/1.3/validated/index.html.gz differ
diff --git a/gems/dry-monads/1.4/case-equality/index.html b/gems/dry-monads/1.4/case-equality/index.html
index b6deaf2bac..1a2e5ee56e 100644
--- a/gems/dry-monads/1.4/case-equality/index.html
+++ b/gems/dry-monads/1.4/case-equality/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Case equality

Case equality

diff --git a/gems/dry-monads/1.4/case-equality/index.html.gz b/gems/dry-monads/1.4/case-equality/index.html.gz index f27a10d9d4..c22300221a 100644 Binary files a/gems/dry-monads/1.4/case-equality/index.html.gz and b/gems/dry-monads/1.4/case-equality/index.html.gz differ diff --git a/gems/dry-monads/1.4/do-notation/index.html b/gems/dry-monads/1.4/do-notation/index.html index 2fcb1e1606..30bb9287d2 100644 --- a/gems/dry-monads/1.4/do-notation/index.html +++ b/gems/dry-monads/1.4/do-notation/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Do notation

Composing several monadic values can become tedious because you need to pass around unwrapped values in lambdas (aka blocks). Haskell was one of the first languages faced this problem. To work around it Haskell has a special syntax for combining monadic operations called the "do notation". If you're familiar with Scala it has for-comprehensions for a similar purpose. It is not possible to implement do in Ruby but it is possible to emulate it to some extent, i.e. achieve comparable usefulness.

+});

Do notation

Composing several monadic values can become tedious because you need to pass around unwrapped values in lambdas (aka blocks). Haskell was one of the first languages faced this problem. To work around it Haskell has a special syntax for combining monadic operations called the "do notation". If you're familiar with Scala it has for-comprehensions for a similar purpose. It is not possible to implement do in Ruby but it is possible to emulate it to some extent, i.e. achieve comparable usefulness.

What Do does is passing an unwrapping block to certain methods. The block tries to extract the underlying value from a monadic object and either short-circuits the execution (in case of a failure) or returns the unwrapped value back.

diff --git a/gems/dry-monads/1.4/do-notation/index.html.gz b/gems/dry-monads/1.4/do-notation/index.html.gz index f79233f17a..6be245460b 100644 Binary files a/gems/dry-monads/1.4/do-notation/index.html.gz and b/gems/dry-monads/1.4/do-notation/index.html.gz differ diff --git a/gems/dry-monads/1.4/getting-started/index.html b/gems/dry-monads/1.4/getting-started/index.html index c9c15ce423..2f61eb16ed 100644 --- a/gems/dry-monads/1.4/getting-started/index.html +++ b/gems/dry-monads/1.4/getting-started/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Getting started

Installation

diff --git a/gems/dry-monads/1.4/getting-started/index.html.gz b/gems/dry-monads/1.4/getting-started/index.html.gz index d16e957d1b..04fa9e365d 100644 Binary files a/gems/dry-monads/1.4/getting-started/index.html.gz and b/gems/dry-monads/1.4/getting-started/index.html.gz differ diff --git a/gems/dry-monads/1.4/index.html b/gems/dry-monads/1.4/index.html index 67d6dd041c..7d4e5b5213 100644 --- a/gems/dry-monads/1.4/index.html +++ b/gems/dry-monads/1.4/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-monads is a set of common monads for Ruby. Monads provide an elegant way of handling errors, exceptions and chaining functions so that the code is much more understandable and has all the error handling, without all the ifs and elses. The gem was inspired by the Kleisli gem.

+});

Introduction

dry-monads is a set of common monads for Ruby. Monads provide an elegant way of handling errors, exceptions and chaining functions so that the code is much more understandable and has all the error handling, without all the ifs and elses. The gem was inspired by the Kleisli gem.

What is a monad, anyway? Simply, a monoid in the category of endofunctors. The term comes from category theory and some believe monads are tough to understand or explain. It's hard to say why people think so because you certainly don't need to know category theory for using them, just like you don't need it for, say, using functions.

diff --git a/gems/dry-monads/1.4/index.html.gz b/gems/dry-monads/1.4/index.html.gz index 71ca8022e9..80292e99ba 100644 Binary files a/gems/dry-monads/1.4/index.html.gz and b/gems/dry-monads/1.4/index.html.gz differ diff --git a/gems/dry-monads/1.4/list/index.html b/gems/dry-monads/1.4/list/index.html index b0d8475c39..9a4fc2a1d2 100644 --- a/gems/dry-monads/1.4/list/index.html +++ b/gems/dry-monads/1.4/list/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

List

bind

diff --git a/gems/dry-monads/1.4/list/index.html.gz b/gems/dry-monads/1.4/list/index.html.gz index 34aac45aa0..e1bf977e8e 100644 Binary files a/gems/dry-monads/1.4/list/index.html.gz and b/gems/dry-monads/1.4/list/index.html.gz differ diff --git a/gems/dry-monads/1.4/maybe/index.html b/gems/dry-monads/1.4/maybe/index.html index 20341b9cf1..dab7076592 100644 --- a/gems/dry-monads/1.4/maybe/index.html +++ b/gems/dry-monads/1.4/maybe/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Maybe

The Maybe monad is used when a series of computations could return nil at any point.

+});

Pattern matching

Ruby 2.7 introduces pattern matching, it is nicely supported by dry-monads 1.3+.

+});

Result

The Result monad is useful to express a series of computations that might +});

Result

The Result monad is useful to express a series of computations that might return an error object with additional information.

The Result mixin has two type constructors: Success and Failure. The Success diff --git a/gems/dry-monads/1.4/result/index.html.gz b/gems/dry-monads/1.4/result/index.html.gz index 5d37e5ac17..34ecb7958a 100644 Binary files a/gems/dry-monads/1.4/result/index.html.gz and b/gems/dry-monads/1.4/result/index.html.gz differ diff --git a/gems/dry-monads/1.4/task/index.html b/gems/dry-monads/1.4/task/index.html index a0bed9c104..f7436abbd4 100644 --- a/gems/dry-monads/1.4/task/index.html +++ b/gems/dry-monads/1.4/task/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Task

Task represents an asynchronous computation. It is similar to the IO type in a sense it can be used to wrap side-effectful actions. Tasks are usually run on a thread pool but also can be executed immediately on the current thread. Internally, Task uses Promise from the concurrent-ruby gem, basically it's a thin wrapper with a monadic interface which makes it easily composable with other monads.

+});

Tracing failures

"Left" values of right-biased monads like Maybe and Result (as in, None() and Failure()) ignore blocks passed to fmap and bind. Because of this, these values travel across the application without any modification. If the place where a Failure was constructed is burried somewhere deep in the app or library code it may be pretty hard to find out where exactly the error occurred.

+});

Tracing failures

"Left" values of right-biased monads like Maybe and Result (as in, None() and Failure()) ignore blocks passed to fmap and bind. Because of this, these values travel across the application without any modification. If the place where a Failure was constructed is burried somewhere deep in the app or library code it may be pretty hard to find out where exactly the error occurred.

This is a noticable downside compared to "good" old exceptions. To address it, every Failure(...) and None() value tracks the line where it was created:

# create_user.rb
diff --git a/gems/dry-monads/1.4/tracing-failures/index.html.gz b/gems/dry-monads/1.4/tracing-failures/index.html.gz
index 44562487bd..3e9ed14700 100644
Binary files a/gems/dry-monads/1.4/tracing-failures/index.html.gz and b/gems/dry-monads/1.4/tracing-failures/index.html.gz differ
diff --git a/gems/dry-monads/1.4/try/index.html b/gems/dry-monads/1.4/try/index.html
index 71d98a0af5..de31198caf 100644
--- a/gems/dry-monads/1.4/try/index.html
+++ b/gems/dry-monads/1.4/try/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Try

Rescues a block from an exception. The Try monad is useful when you want to wrap some code that can raise exceptions of certain types. A common example is making an HTTP request or querying a database.

+});

Try

Rescues a block from an exception. The Try monad is useful when you want to wrap some code that can raise exceptions of certain types. A common example is making an HTTP request or querying a database.

require 'dry/monads'
 
 class ExceptionalLand
diff --git a/gems/dry-monads/1.4/try/index.html.gz b/gems/dry-monads/1.4/try/index.html.gz
index 334c6f0117..959d5b3571 100644
Binary files a/gems/dry-monads/1.4/try/index.html.gz and b/gems/dry-monads/1.4/try/index.html.gz differ
diff --git a/gems/dry-monads/1.4/unit/index.html b/gems/dry-monads/1.4/unit/index.html
index f029f6231d..3d2191c59a 100644
--- a/gems/dry-monads/1.4/unit/index.html
+++ b/gems/dry-monads/1.4/unit/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Unit

Some constructors do not require you to pass a value. As a default they use Unit, a special singleton value:

+});

Unit

Some constructors do not require you to pass a value. As a default they use Unit, a special singleton value:

extend Dry::Monads[:result]
 
 Success().value! # => Unit
diff --git a/gems/dry-monads/1.4/unit/index.html.gz b/gems/dry-monads/1.4/unit/index.html.gz
index 9268ffff2e..0b05d744c8 100644
Binary files a/gems/dry-monads/1.4/unit/index.html.gz and b/gems/dry-monads/1.4/unit/index.html.gz differ
diff --git a/gems/dry-monads/1.4/validated/index.html b/gems/dry-monads/1.4/validated/index.html
index e3bc01247b..37a258f47a 100644
--- a/gems/dry-monads/1.4/validated/index.html
+++ b/gems/dry-monads/1.4/validated/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Validated

Suppose you've got a form to validate. If you are using Result combined with Do your code might look like this:

+});

Validated

Suppose you've got a form to validate. If you are using Result combined with Do your code might look like this:

require 'dry/monads'
 
 class CreateAccount
diff --git a/gems/dry-monads/1.4/validated/index.html.gz b/gems/dry-monads/1.4/validated/index.html.gz
index a0287bd2d0..f2067feb3d 100644
Binary files a/gems/dry-monads/1.4/validated/index.html.gz and b/gems/dry-monads/1.4/validated/index.html.gz differ
diff --git a/gems/dry-monads/1.5/case-equality/index.html b/gems/dry-monads/1.5/case-equality/index.html
index 6191027202..e530d1cf58 100644
--- a/gems/dry-monads/1.5/case-equality/index.html
+++ b/gems/dry-monads/1.5/case-equality/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Case equality

Case equality

diff --git a/gems/dry-monads/1.5/case-equality/index.html.gz b/gems/dry-monads/1.5/case-equality/index.html.gz index 1455e2a071..6fb8721ccc 100644 Binary files a/gems/dry-monads/1.5/case-equality/index.html.gz and b/gems/dry-monads/1.5/case-equality/index.html.gz differ diff --git a/gems/dry-monads/1.5/do-notation/index.html b/gems/dry-monads/1.5/do-notation/index.html index 21a3c175af..3b03cc2170 100644 --- a/gems/dry-monads/1.5/do-notation/index.html +++ b/gems/dry-monads/1.5/do-notation/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Do notation

Composing several monadic values can become tedious because you need to pass around unwrapped values in lambdas (aka blocks). Haskell was one of the first languages faced this problem. To work around it Haskell has a special syntax for combining monadic operations called the "do notation". If you're familiar with Scala it has for-comprehensions for a similar purpose. It is not possible to implement do in Ruby but it is possible to emulate it to some extent, i.e. achieve comparable usefulness.

+});

Do notation

Composing several monadic values can become tedious because you need to pass around unwrapped values in lambdas (aka blocks). Haskell was one of the first languages faced this problem. To work around it Haskell has a special syntax for combining monadic operations called the "do notation". If you're familiar with Scala it has for-comprehensions for a similar purpose. It is not possible to implement do in Ruby but it is possible to emulate it to some extent, i.e. achieve comparable usefulness.

What Do does is passing an unwrapping block to certain methods. The block tries to extract the underlying value from a monadic object and either short-circuits the execution (in case of a failure) or returns the unwrapped value back.

diff --git a/gems/dry-monads/1.5/do-notation/index.html.gz b/gems/dry-monads/1.5/do-notation/index.html.gz index e98f1548dd..e7fc0657e8 100644 Binary files a/gems/dry-monads/1.5/do-notation/index.html.gz and b/gems/dry-monads/1.5/do-notation/index.html.gz differ diff --git a/gems/dry-monads/1.5/getting-started/index.html b/gems/dry-monads/1.5/getting-started/index.html index 9a280dca22..6cc9c29ad5 100644 --- a/gems/dry-monads/1.5/getting-started/index.html +++ b/gems/dry-monads/1.5/getting-started/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Getting started

Installation

diff --git a/gems/dry-monads/1.5/getting-started/index.html.gz b/gems/dry-monads/1.5/getting-started/index.html.gz index 78da2ddae0..2f59ecb4fe 100644 Binary files a/gems/dry-monads/1.5/getting-started/index.html.gz and b/gems/dry-monads/1.5/getting-started/index.html.gz differ diff --git a/gems/dry-monads/1.5/index.html b/gems/dry-monads/1.5/index.html index ff519341cf..4a35223fb3 100644 --- a/gems/dry-monads/1.5/index.html +++ b/gems/dry-monads/1.5/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-monads is a set of common monads for Ruby. Monads provide an elegant way of handling errors, exceptions and chaining functions so that the code is much more understandable and has all the error handling, without all the ifs and elses. The gem was inspired by the Kleisli gem.

+});

Introduction

dry-monads is a set of common monads for Ruby. Monads provide an elegant way of handling errors, exceptions and chaining functions so that the code is much more understandable and has all the error handling, without all the ifs and elses. The gem was inspired by the Kleisli gem.

What is a monad, anyway? Simply, a monoid in the category of endofunctors. The term comes from category theory and some believe monads are tough to understand or explain. It's hard to say why people think so because you certainly don't need to know category theory for using them, just like you don't need it for, say, using functions.

diff --git a/gems/dry-monads/1.5/index.html.gz b/gems/dry-monads/1.5/index.html.gz index 57c9e5f806..1a7cff186c 100644 Binary files a/gems/dry-monads/1.5/index.html.gz and b/gems/dry-monads/1.5/index.html.gz differ diff --git a/gems/dry-monads/1.5/list/index.html b/gems/dry-monads/1.5/list/index.html index 2fe41b6b31..fff53fd980 100644 --- a/gems/dry-monads/1.5/list/index.html +++ b/gems/dry-monads/1.5/list/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

List

bind

diff --git a/gems/dry-monads/1.5/list/index.html.gz b/gems/dry-monads/1.5/list/index.html.gz index 29d23d3ebc..ab96ae56af 100644 Binary files a/gems/dry-monads/1.5/list/index.html.gz and b/gems/dry-monads/1.5/list/index.html.gz differ diff --git a/gems/dry-monads/1.5/maybe/index.html b/gems/dry-monads/1.5/maybe/index.html index ea70a9d9bc..0228b93ed3 100644 --- a/gems/dry-monads/1.5/maybe/index.html +++ b/gems/dry-monads/1.5/maybe/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Maybe

The Maybe monad is used when a series of computations could return nil at any point.

+});

Pattern matching

Ruby 2.7 introduces pattern matching, it is nicely supported by dry-monads 1.3+.

+});

Result

The Result monad is useful to express a series of computations that might +});

Result

The Result monad is useful to express a series of computations that might return an error object with additional information.

The Result mixin has two type constructors: Success and Failure. The Success diff --git a/gems/dry-monads/1.5/result/index.html.gz b/gems/dry-monads/1.5/result/index.html.gz index fff3d1fec8..f4f338d2f6 100644 Binary files a/gems/dry-monads/1.5/result/index.html.gz and b/gems/dry-monads/1.5/result/index.html.gz differ diff --git a/gems/dry-monads/1.5/task/index.html b/gems/dry-monads/1.5/task/index.html index 92abbef7db..017acf8d31 100644 --- a/gems/dry-monads/1.5/task/index.html +++ b/gems/dry-monads/1.5/task/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Task

Task represents an asynchronous computation. It is similar to the IO type in a sense it can be used to wrap side-effectful actions. Tasks are usually run on a thread pool but also can be executed immediately on the current thread. Internally, Task uses Promise from the concurrent-ruby gem, basically it's a thin wrapper with a monadic interface which makes it easily composable with other monads.

+});

Tracing failures

"Left" values of right-biased monads like Maybe and Result (as in, None() and Failure()) ignore blocks passed to fmap and bind. Because of this, these values travel across the application without any modification. If the place where a Failure was constructed is burried somewhere deep in the app or library code it may be pretty hard to find out where exactly the error occurred.

+});

Tracing failures

"Left" values of right-biased monads like Maybe and Result (as in, None() and Failure()) ignore blocks passed to fmap and bind. Because of this, these values travel across the application without any modification. If the place where a Failure was constructed is burried somewhere deep in the app or library code it may be pretty hard to find out where exactly the error occurred.

This is a noticable downside compared to "good" old exceptions. To address it, every Failure(...) and None() value tracks the line where it was created:

# create_user.rb
diff --git a/gems/dry-monads/1.5/tracing-failures/index.html.gz b/gems/dry-monads/1.5/tracing-failures/index.html.gz
index 81075b93af..cf320a944a 100644
Binary files a/gems/dry-monads/1.5/tracing-failures/index.html.gz and b/gems/dry-monads/1.5/tracing-failures/index.html.gz differ
diff --git a/gems/dry-monads/1.5/try/index.html b/gems/dry-monads/1.5/try/index.html
index 455b54f5c4..2cf460e547 100644
--- a/gems/dry-monads/1.5/try/index.html
+++ b/gems/dry-monads/1.5/try/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Try

Rescues a block from an exception. The Try monad is useful when you want to wrap some code that can raise exceptions of certain types. A common example is making an HTTP request or querying a database.

+});

Try

Rescues a block from an exception. The Try monad is useful when you want to wrap some code that can raise exceptions of certain types. A common example is making an HTTP request or querying a database.

require 'dry/monads'
 
 class ExceptionalLand
diff --git a/gems/dry-monads/1.5/try/index.html.gz b/gems/dry-monads/1.5/try/index.html.gz
index 2b9bd4b1bf..6742d3edc4 100644
Binary files a/gems/dry-monads/1.5/try/index.html.gz and b/gems/dry-monads/1.5/try/index.html.gz differ
diff --git a/gems/dry-monads/1.5/unit/index.html b/gems/dry-monads/1.5/unit/index.html
index 9a48fafd76..db0116d083 100644
--- a/gems/dry-monads/1.5/unit/index.html
+++ b/gems/dry-monads/1.5/unit/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Unit

Some constructors do not require you to pass a value. As a default they use Unit, a special singleton value:

+});

Unit

Some constructors do not require you to pass a value. As a default they use Unit, a special singleton value:

extend Dry::Monads[:result]
 
 Success().value! # => Unit
diff --git a/gems/dry-monads/1.5/unit/index.html.gz b/gems/dry-monads/1.5/unit/index.html.gz
index 29f73fb2f5..4fc11834d9 100644
Binary files a/gems/dry-monads/1.5/unit/index.html.gz and b/gems/dry-monads/1.5/unit/index.html.gz differ
diff --git a/gems/dry-monads/1.5/validated/index.html b/gems/dry-monads/1.5/validated/index.html
index dfea370923..93fda84066 100644
--- a/gems/dry-monads/1.5/validated/index.html
+++ b/gems/dry-monads/1.5/validated/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Validated

Suppose you've got a form to validate. If you are using Result combined with Do your code might look like this:

+});

Validated

Suppose you've got a form to validate. If you are using Result combined with Do your code might look like this:

require 'dry/monads'
 
 class CreateAccount
diff --git a/gems/dry-monads/1.5/validated/index.html.gz b/gems/dry-monads/1.5/validated/index.html.gz
index e5553200dc..00a598aa0a 100644
Binary files a/gems/dry-monads/1.5/validated/index.html.gz and b/gems/dry-monads/1.5/validated/index.html.gz differ
diff --git a/gems/dry-monads/1.6/case-equality/index.html b/gems/dry-monads/1.6/case-equality/index.html
index dd1eb0177e..3e2f292be8 100644
--- a/gems/dry-monads/1.6/case-equality/index.html
+++ b/gems/dry-monads/1.6/case-equality/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Case equality

Case equality

diff --git a/gems/dry-monads/1.6/case-equality/index.html.gz b/gems/dry-monads/1.6/case-equality/index.html.gz index c6fb3960d5..aba283891a 100644 Binary files a/gems/dry-monads/1.6/case-equality/index.html.gz and b/gems/dry-monads/1.6/case-equality/index.html.gz differ diff --git a/gems/dry-monads/1.6/do-notation/index.html b/gems/dry-monads/1.6/do-notation/index.html index 04a41f5bcd..1abe7054f0 100644 --- a/gems/dry-monads/1.6/do-notation/index.html +++ b/gems/dry-monads/1.6/do-notation/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Do notation

Composing several monadic values can become tedious because you need to pass around unwrapped values in lambdas (aka blocks). Haskell was one of the first languages faced this problem. To work around it Haskell has a special syntax for combining monadic operations called the "do notation". If you're familiar with Scala it has for-comprehensions for a similar purpose. It is not possible to implement do in Ruby but it is possible to emulate it to some extent, i.e. achieve comparable usefulness.

+});

Do notation

Composing several monadic values can become tedious because you need to pass around unwrapped values in lambdas (aka blocks). Haskell was one of the first languages faced this problem. To work around it Haskell has a special syntax for combining monadic operations called the "do notation". If you're familiar with Scala it has for-comprehensions for a similar purpose. It is not possible to implement do in Ruby but it is possible to emulate it to some extent, i.e. achieve comparable usefulness.

What Do does is passing an unwrapping block to certain methods. The block tries to extract the underlying value from a monadic object and either short-circuits the execution (in case of a failure) or returns the unwrapped value back.

diff --git a/gems/dry-monads/1.6/do-notation/index.html.gz b/gems/dry-monads/1.6/do-notation/index.html.gz index 4025134aed..fb780872c6 100644 Binary files a/gems/dry-monads/1.6/do-notation/index.html.gz and b/gems/dry-monads/1.6/do-notation/index.html.gz differ diff --git a/gems/dry-monads/1.6/getting-started/index.html b/gems/dry-monads/1.6/getting-started/index.html index 48e5ec9af5..5b7ae96134 100644 --- a/gems/dry-monads/1.6/getting-started/index.html +++ b/gems/dry-monads/1.6/getting-started/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Getting started

Installation

diff --git a/gems/dry-monads/1.6/getting-started/index.html.gz b/gems/dry-monads/1.6/getting-started/index.html.gz index 5e0a9fa506..ac21e20304 100644 Binary files a/gems/dry-monads/1.6/getting-started/index.html.gz and b/gems/dry-monads/1.6/getting-started/index.html.gz differ diff --git a/gems/dry-monads/1.6/index.html b/gems/dry-monads/1.6/index.html index b56bea8b64..8a7dc38c85 100644 --- a/gems/dry-monads/1.6/index.html +++ b/gems/dry-monads/1.6/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-monads is a set of common monads for Ruby. Monads provide an elegant way of handling errors, exceptions and chaining functions so that the code is much more understandable and has all the error handling, without all the ifs and elses. The gem was inspired by the Kleisli gem.

+});

Introduction

dry-monads is a set of common monads for Ruby. Monads provide an elegant way of handling errors, exceptions and chaining functions so that the code is much more understandable and has all the error handling, without all the ifs and elses. The gem was inspired by the Kleisli gem.

What is a monad, anyway? Simply, a monoid in the category of endofunctors. The term comes from category theory and some believe monads are tough to understand or explain. It's hard to say why people think so because you certainly don't need to know category theory for using them, just like you don't need it for, say, using functions.

diff --git a/gems/dry-monads/1.6/index.html.gz b/gems/dry-monads/1.6/index.html.gz index 6bb8d84405..3ecf13c98b 100644 Binary files a/gems/dry-monads/1.6/index.html.gz and b/gems/dry-monads/1.6/index.html.gz differ diff --git a/gems/dry-monads/1.6/list/index.html b/gems/dry-monads/1.6/list/index.html index 5c537d6740..39de2591de 100644 --- a/gems/dry-monads/1.6/list/index.html +++ b/gems/dry-monads/1.6/list/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

List

bind

diff --git a/gems/dry-monads/1.6/list/index.html.gz b/gems/dry-monads/1.6/list/index.html.gz index 63602d1d45..cec393fa9e 100644 Binary files a/gems/dry-monads/1.6/list/index.html.gz and b/gems/dry-monads/1.6/list/index.html.gz differ diff --git a/gems/dry-monads/1.6/maybe/index.html b/gems/dry-monads/1.6/maybe/index.html index 4d859cee9d..ee12805ca2 100644 --- a/gems/dry-monads/1.6/maybe/index.html +++ b/gems/dry-monads/1.6/maybe/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Maybe

The Maybe monad is used when a series of computations could return nil at any point.

+});

Pattern matching

Ruby 2.7 introduces pattern matching, it is nicely supported by dry-monads 1.3+.

+});

Result

The Result monad is useful to express a series of computations that might +});

Result

The Result monad is useful to express a series of computations that might return an error object with additional information.

The Result mixin has two type constructors: Success and Failure. The Success diff --git a/gems/dry-monads/1.6/result/index.html.gz b/gems/dry-monads/1.6/result/index.html.gz index 0312021b9c..4abb345fab 100644 Binary files a/gems/dry-monads/1.6/result/index.html.gz and b/gems/dry-monads/1.6/result/index.html.gz differ diff --git a/gems/dry-monads/1.6/task/index.html b/gems/dry-monads/1.6/task/index.html index 6424e633de..11c0f2c7a4 100644 --- a/gems/dry-monads/1.6/task/index.html +++ b/gems/dry-monads/1.6/task/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Task

Task represents an asynchronous computation. It is similar to the IO type in a sense it can be used to wrap side-effectful actions. Tasks are usually run on a thread pool but also can be executed immediately on the current thread. Internally, Task uses Promise from the concurrent-ruby gem, basically it's a thin wrapper with a monadic interface which makes it easily composable with other monads.

+});

Tracing failures

"Left" values of right-biased monads like Maybe and Result (as in, None() and Failure()) ignore blocks passed to fmap and bind. Because of this, these values travel across the application without any modification. If the place where a Failure was constructed is burried somewhere deep in the app or library code it may be pretty hard to find out where exactly the error occurred.

+});

Tracing failures

"Left" values of right-biased monads like Maybe and Result (as in, None() and Failure()) ignore blocks passed to fmap and bind. Because of this, these values travel across the application without any modification. If the place where a Failure was constructed is burried somewhere deep in the app or library code it may be pretty hard to find out where exactly the error occurred.

This is a noticable downside compared to "good" old exceptions. To address it, every Failure(...) and None() value tracks the line where it was created:

# create_user.rb
diff --git a/gems/dry-monads/1.6/tracing-failures/index.html.gz b/gems/dry-monads/1.6/tracing-failures/index.html.gz
index e07c7e3bd3..5be20c29c2 100644
Binary files a/gems/dry-monads/1.6/tracing-failures/index.html.gz and b/gems/dry-monads/1.6/tracing-failures/index.html.gz differ
diff --git a/gems/dry-monads/1.6/try/index.html b/gems/dry-monads/1.6/try/index.html
index bd451fac06..7451efb383 100644
--- a/gems/dry-monads/1.6/try/index.html
+++ b/gems/dry-monads/1.6/try/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Try

Rescues a block from an exception. The Try monad is useful when you want to wrap some code that can raise exceptions of certain types. A common example is making an HTTP request or querying a database.

+});

Try

Rescues a block from an exception. The Try monad is useful when you want to wrap some code that can raise exceptions of certain types. A common example is making an HTTP request or querying a database.

require 'dry/monads'
 
 class ExceptionalLand
diff --git a/gems/dry-monads/1.6/try/index.html.gz b/gems/dry-monads/1.6/try/index.html.gz
index 340095e04c..fd43408f00 100644
Binary files a/gems/dry-monads/1.6/try/index.html.gz and b/gems/dry-monads/1.6/try/index.html.gz differ
diff --git a/gems/dry-monads/1.6/unit/index.html b/gems/dry-monads/1.6/unit/index.html
index b3fced2171..80303a542e 100644
--- a/gems/dry-monads/1.6/unit/index.html
+++ b/gems/dry-monads/1.6/unit/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Unit

Some constructors do not require you to pass a value. As a default they use Unit, a special singleton value:

+});

Unit

Some constructors do not require you to pass a value. As a default they use Unit, a special singleton value:

extend Dry::Monads[:result]
 
 Success().value! # => Unit
diff --git a/gems/dry-monads/1.6/unit/index.html.gz b/gems/dry-monads/1.6/unit/index.html.gz
index 1d95d4d51f..1cfae5006d 100644
Binary files a/gems/dry-monads/1.6/unit/index.html.gz and b/gems/dry-monads/1.6/unit/index.html.gz differ
diff --git a/gems/dry-monads/1.6/validated/index.html b/gems/dry-monads/1.6/validated/index.html
index 6e1e5fd965..5423483c6e 100644
--- a/gems/dry-monads/1.6/validated/index.html
+++ b/gems/dry-monads/1.6/validated/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Validated

Suppose you've got a form to validate. If you are using Result combined with Do your code might look like this:

+});

Validated

Suppose you've got a form to validate. If you are using Result combined with Do your code might look like this:

require 'dry/monads'
 
 class CreateAccount
diff --git a/gems/dry-monads/1.6/validated/index.html.gz b/gems/dry-monads/1.6/validated/index.html.gz
index 22194676b3..22b20dbc40 100644
Binary files a/gems/dry-monads/1.6/validated/index.html.gz and b/gems/dry-monads/1.6/validated/index.html.gz differ
diff --git a/gems/dry-monads/index.html.gz b/gems/dry-monads/index.html.gz
index 95265a8756..83927a6b9a 100644
Binary files a/gems/dry-monads/index.html.gz and b/gems/dry-monads/index.html.gz differ
diff --git a/gems/dry-monads/main/case-equality/index.html b/gems/dry-monads/main/case-equality/index.html
index 0bbb7852ff..2268fd71a7 100644
--- a/gems/dry-monads/main/case-equality/index.html
+++ b/gems/dry-monads/main/case-equality/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Case equality

Case equality

diff --git a/gems/dry-monads/main/case-equality/index.html.gz b/gems/dry-monads/main/case-equality/index.html.gz index 08f2f56e7b..6385451120 100644 Binary files a/gems/dry-monads/main/case-equality/index.html.gz and b/gems/dry-monads/main/case-equality/index.html.gz differ diff --git a/gems/dry-monads/main/do-notation/index.html b/gems/dry-monads/main/do-notation/index.html index 654ab2b1da..4d7478456b 100644 --- a/gems/dry-monads/main/do-notation/index.html +++ b/gems/dry-monads/main/do-notation/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Do notation

Composing several monadic values can become tedious because you need to pass around unwrapped values in lambdas (aka blocks). Haskell was one of the first languages faced this problem. To work around it Haskell has a special syntax for combining monadic operations called the "do notation". If you're familiar with Scala it has for-comprehensions for a similar purpose. It is not possible to implement do in Ruby but it is possible to emulate it to some extent, i.e. achieve comparable usefulness.

+});

Do notation

Composing several monadic values can become tedious because you need to pass around unwrapped values in lambdas (aka blocks). Haskell was one of the first languages faced this problem. To work around it Haskell has a special syntax for combining monadic operations called the "do notation". If you're familiar with Scala it has for-comprehensions for a similar purpose. It is not possible to implement do in Ruby but it is possible to emulate it to some extent, i.e. achieve comparable usefulness.

What Do does is passing an unwrapping block to certain methods. The block tries to extract the underlying value from a monadic object and either short-circuits the execution (in case of a failure) or returns the unwrapped value back.

diff --git a/gems/dry-monads/main/do-notation/index.html.gz b/gems/dry-monads/main/do-notation/index.html.gz index edb20bf989..0ac66e8822 100644 Binary files a/gems/dry-monads/main/do-notation/index.html.gz and b/gems/dry-monads/main/do-notation/index.html.gz differ diff --git a/gems/dry-monads/main/getting-started/index.html b/gems/dry-monads/main/getting-started/index.html index c9f1aa2d7d..f5c62dc574 100644 --- a/gems/dry-monads/main/getting-started/index.html +++ b/gems/dry-monads/main/getting-started/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Getting started

Installation

diff --git a/gems/dry-monads/main/getting-started/index.html.gz b/gems/dry-monads/main/getting-started/index.html.gz index 6cf6a38163..6a48898f04 100644 Binary files a/gems/dry-monads/main/getting-started/index.html.gz and b/gems/dry-monads/main/getting-started/index.html.gz differ diff --git a/gems/dry-monads/main/index.html b/gems/dry-monads/main/index.html index fd52874564..5954ab6e30 100644 --- a/gems/dry-monads/main/index.html +++ b/gems/dry-monads/main/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-monads is a set of common monads for Ruby. Monads provide an elegant way of handling errors, exceptions and chaining functions so that the code is much more understandable and has all the error handling, without all the ifs and elses. The gem was inspired by the Kleisli gem.

+});

Introduction

dry-monads is a set of common monads for Ruby. Monads provide an elegant way of handling errors, exceptions and chaining functions so that the code is much more understandable and has all the error handling, without all the ifs and elses. The gem was inspired by the Kleisli gem.

What is a monad, anyway? Simply, a monoid in the category of endofunctors. The term comes from category theory and some believe monads are tough to understand or explain. It's hard to say why people think so because you certainly don't need to know category theory for using them, just like you don't need it for, say, using functions.

diff --git a/gems/dry-monads/main/index.html.gz b/gems/dry-monads/main/index.html.gz index 1f86418132..4821a2d57b 100644 Binary files a/gems/dry-monads/main/index.html.gz and b/gems/dry-monads/main/index.html.gz differ diff --git a/gems/dry-monads/main/list/index.html b/gems/dry-monads/main/list/index.html index 7b59a8417e..6846a0e7b9 100644 --- a/gems/dry-monads/main/list/index.html +++ b/gems/dry-monads/main/list/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

List

bind

diff --git a/gems/dry-monads/main/list/index.html.gz b/gems/dry-monads/main/list/index.html.gz index 81aa1bac5c..ea2cba64d8 100644 Binary files a/gems/dry-monads/main/list/index.html.gz and b/gems/dry-monads/main/list/index.html.gz differ diff --git a/gems/dry-monads/main/maybe/index.html b/gems/dry-monads/main/maybe/index.html index 55ea999961..895f74a0aa 100644 --- a/gems/dry-monads/main/maybe/index.html +++ b/gems/dry-monads/main/maybe/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Maybe

The Maybe monad is used when a series of computations could return nil at any point.

+});

Pattern matching

Ruby 2.7 introduces pattern matching, it is nicely supported by dry-monads 1.3+.

+});

Result

The Result monad is useful to express a series of computations that might +});

Result

The Result monad is useful to express a series of computations that might return an error object with additional information.

The Result mixin has two type constructors: Success and Failure. The Success diff --git a/gems/dry-monads/main/result/index.html.gz b/gems/dry-monads/main/result/index.html.gz index b3894e13d7..664de845ea 100644 Binary files a/gems/dry-monads/main/result/index.html.gz and b/gems/dry-monads/main/result/index.html.gz differ diff --git a/gems/dry-monads/main/task/index.html b/gems/dry-monads/main/task/index.html index bb42ebe9e5..99e292d894 100644 --- a/gems/dry-monads/main/task/index.html +++ b/gems/dry-monads/main/task/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Task

Task represents an asynchronous computation. It is similar to the IO type in a sense it can be used to wrap side-effectful actions. Tasks are usually run on a thread pool but also can be executed immediately on the current thread. Internally, Task uses Promise from the concurrent-ruby gem, basically it's a thin wrapper with a monadic interface which makes it easily composable with other monads.

+});

Tracing failures

"Left" values of right-biased monads like Maybe and Result (as in, None() and Failure()) ignore blocks passed to fmap and bind. Because of this, these values travel across the application without any modification. If the place where a Failure was constructed is burried somewhere deep in the app or library code it may be pretty hard to find out where exactly the error occurred.

+});

Tracing failures

"Left" values of right-biased monads like Maybe and Result (as in, None() and Failure()) ignore blocks passed to fmap and bind. Because of this, these values travel across the application without any modification. If the place where a Failure was constructed is burried somewhere deep in the app or library code it may be pretty hard to find out where exactly the error occurred.

This is a noticable downside compared to "good" old exceptions. To address it, every Failure(...) and None() value tracks the line where it was created:

# create_user.rb
diff --git a/gems/dry-monads/main/tracing-failures/index.html.gz b/gems/dry-monads/main/tracing-failures/index.html.gz
index e5871d0ceb..0d8ae74a3d 100644
Binary files a/gems/dry-monads/main/tracing-failures/index.html.gz and b/gems/dry-monads/main/tracing-failures/index.html.gz differ
diff --git a/gems/dry-monads/main/try/index.html b/gems/dry-monads/main/try/index.html
index 3bf0b0a265..744e12a8e6 100644
--- a/gems/dry-monads/main/try/index.html
+++ b/gems/dry-monads/main/try/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Try

Rescues a block from an exception. The Try monad is useful when you want to wrap some code that can raise exceptions of certain types. A common example is making an HTTP request or querying a database.

+});

Try

Rescues a block from an exception. The Try monad is useful when you want to wrap some code that can raise exceptions of certain types. A common example is making an HTTP request or querying a database.

require 'dry/monads'
 
 class ExceptionalLand
diff --git a/gems/dry-monads/main/try/index.html.gz b/gems/dry-monads/main/try/index.html.gz
index dbad08ec30..895c545190 100644
Binary files a/gems/dry-monads/main/try/index.html.gz and b/gems/dry-monads/main/try/index.html.gz differ
diff --git a/gems/dry-monads/main/unit/index.html b/gems/dry-monads/main/unit/index.html
index 13bc40cec4..5fc49bc3c8 100644
--- a/gems/dry-monads/main/unit/index.html
+++ b/gems/dry-monads/main/unit/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Unit

Some constructors do not require you to pass a value. As a default they use Unit, a special singleton value:

+});

Unit

Some constructors do not require you to pass a value. As a default they use Unit, a special singleton value:

extend Dry::Monads[:result]
 
 Success().value! # => Unit
diff --git a/gems/dry-monads/main/unit/index.html.gz b/gems/dry-monads/main/unit/index.html.gz
index 9eefaa1ba7..50275e4cc6 100644
Binary files a/gems/dry-monads/main/unit/index.html.gz and b/gems/dry-monads/main/unit/index.html.gz differ
diff --git a/gems/dry-monads/main/validated/index.html b/gems/dry-monads/main/validated/index.html
index 90a93ada53..8fdb3f2cb5 100644
--- a/gems/dry-monads/main/validated/index.html
+++ b/gems/dry-monads/main/validated/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Validated

Suppose you've got a form to validate. If you are using Result combined with Do your code might look like this:

+});

Validated

Suppose you've got a form to validate. If you are using Result combined with Do your code might look like this:

require 'dry/monads'
 
 class CreateAccount
diff --git a/gems/dry-monads/main/validated/index.html.gz b/gems/dry-monads/main/validated/index.html.gz
index 3d89fedfae..b20b7e9862 100644
Binary files a/gems/dry-monads/main/validated/index.html.gz and b/gems/dry-monads/main/validated/index.html.gz differ
diff --git a/gems/dry-monitor/0.6/index.html b/gems/dry-monitor/0.6/index.html
index 6c251c104b..a171995d5f 100644
--- a/gems/dry-monitor/0.6/index.html
+++ b/gems/dry-monitor/0.6/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

This gem provides monitoring and instrumentation APIs for Ruby. The instrumentation API allows you to measure how certain actions are carried out within Ruby code, such as in a web application or a third-party gem. It is not coupled with any framework and is easy to integrate into any application.

+});

Introduction

This gem provides monitoring and instrumentation APIs for Ruby. The instrumentation API allows you to measure how certain actions are carried out within Ruby code, such as in a web application or a third-party gem. It is not coupled with any framework and is easy to integrate into any application.

It does a couple of things for you:

diff --git a/gems/dry-monitor/0.6/index.html.gz b/gems/dry-monitor/0.6/index.html.gz index 172c57d83f..14b099a25d 100644 Binary files a/gems/dry-monitor/0.6/index.html.gz and b/gems/dry-monitor/0.6/index.html.gz differ diff --git a/gems/dry-monitor/0.6/third-party-integrations/index.html b/gems/dry-monitor/0.6/third-party-integrations/index.html index 05c0a06b4c..7c4a708514 100644 --- a/gems/dry-monitor/0.6/third-party-integrations/index.html +++ b/gems/dry-monitor/0.6/third-party-integrations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Third Party Integrations

Shrine

diff --git a/gems/dry-monitor/0.6/third-party-integrations/index.html.gz b/gems/dry-monitor/0.6/third-party-integrations/index.html.gz index 3a6a599033..dc48fe44bc 100644 Binary files a/gems/dry-monitor/0.6/third-party-integrations/index.html.gz and b/gems/dry-monitor/0.6/third-party-integrations/index.html.gz differ diff --git a/gems/dry-monitor/0.7/index.html b/gems/dry-monitor/0.7/index.html index 431044ea93..d5daa58ef0 100644 --- a/gems/dry-monitor/0.7/index.html +++ b/gems/dry-monitor/0.7/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

This gem provides monitoring and instrumentation APIs for Ruby. The instrumentation API allows you to measure how certain actions are carried out within Ruby code, such as in a web application or a third-party gem. It is not coupled with any framework and is easy to integrate into any application.

+});

Introduction

This gem provides monitoring and instrumentation APIs for Ruby. The instrumentation API allows you to measure how certain actions are carried out within Ruby code, such as in a web application or a third-party gem. It is not coupled with any framework and is easy to integrate into any application.

It does a couple of things for you:

diff --git a/gems/dry-monitor/0.7/index.html.gz b/gems/dry-monitor/0.7/index.html.gz index 8b8c63e50e..ebc26a70a9 100644 Binary files a/gems/dry-monitor/0.7/index.html.gz and b/gems/dry-monitor/0.7/index.html.gz differ diff --git a/gems/dry-monitor/0.7/third-party-integrations/index.html b/gems/dry-monitor/0.7/third-party-integrations/index.html index fddbe2dfa1..1f87e68e69 100644 --- a/gems/dry-monitor/0.7/third-party-integrations/index.html +++ b/gems/dry-monitor/0.7/third-party-integrations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Third Party Integrations

Shrine

diff --git a/gems/dry-monitor/0.7/third-party-integrations/index.html.gz b/gems/dry-monitor/0.7/third-party-integrations/index.html.gz index f0b4850323..c4ed3eac06 100644 Binary files a/gems/dry-monitor/0.7/third-party-integrations/index.html.gz and b/gems/dry-monitor/0.7/third-party-integrations/index.html.gz differ diff --git a/gems/dry-monitor/1.0/index.html b/gems/dry-monitor/1.0/index.html index 8357748137..e5d53739f7 100644 --- a/gems/dry-monitor/1.0/index.html +++ b/gems/dry-monitor/1.0/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

This gem provides monitoring and instrumentation APIs for Ruby. The instrumentation API allows you to measure how certain actions are carried out within Ruby code, such as in a web application or a third-party gem. It is not coupled with any framework and is easy to integrate into any application.

+});

Introduction

This gem provides monitoring and instrumentation APIs for Ruby. The instrumentation API allows you to measure how certain actions are carried out within Ruby code, such as in a web application or a third-party gem. It is not coupled with any framework and is easy to integrate into any application.

It does a couple of things for you:

diff --git a/gems/dry-monitor/1.0/index.html.gz b/gems/dry-monitor/1.0/index.html.gz index 5b7771d6a5..21ea2a80fc 100644 Binary files a/gems/dry-monitor/1.0/index.html.gz and b/gems/dry-monitor/1.0/index.html.gz differ diff --git a/gems/dry-monitor/1.0/third-party-integrations/index.html b/gems/dry-monitor/1.0/third-party-integrations/index.html index 502373b699..d69cd81001 100644 --- a/gems/dry-monitor/1.0/third-party-integrations/index.html +++ b/gems/dry-monitor/1.0/third-party-integrations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Third Party Integrations

Shrine

diff --git a/gems/dry-monitor/1.0/third-party-integrations/index.html.gz b/gems/dry-monitor/1.0/third-party-integrations/index.html.gz index ddebe60460..147b022570 100644 Binary files a/gems/dry-monitor/1.0/third-party-integrations/index.html.gz and b/gems/dry-monitor/1.0/third-party-integrations/index.html.gz differ diff --git a/gems/dry-monitor/index.html.gz b/gems/dry-monitor/index.html.gz index 34091dc96b..07ac32b1ea 100644 Binary files a/gems/dry-monitor/index.html.gz and b/gems/dry-monitor/index.html.gz differ diff --git a/gems/dry-monitor/main/index.html b/gems/dry-monitor/main/index.html index 0dead92261..ffa435d0bd 100644 --- a/gems/dry-monitor/main/index.html +++ b/gems/dry-monitor/main/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

This gem provides monitoring and instrumentation APIs for Ruby. The instrumentation API allows you to measure how certain actions are carried out within Ruby code, such as in a web application or a third-party gem. It is not coupled with any framework and is easy to integrate into any application.

+});

Introduction

This gem provides monitoring and instrumentation APIs for Ruby. The instrumentation API allows you to measure how certain actions are carried out within Ruby code, such as in a web application or a third-party gem. It is not coupled with any framework and is easy to integrate into any application.

It does a couple of things for you:

diff --git a/gems/dry-monitor/main/index.html.gz b/gems/dry-monitor/main/index.html.gz index e507c3af52..d6049cd7c0 100644 Binary files a/gems/dry-monitor/main/index.html.gz and b/gems/dry-monitor/main/index.html.gz differ diff --git a/gems/dry-monitor/main/third-party-integrations/index.html b/gems/dry-monitor/main/third-party-integrations/index.html index f4a7524b1d..ca0c0311ee 100644 --- a/gems/dry-monitor/main/third-party-integrations/index.html +++ b/gems/dry-monitor/main/third-party-integrations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Third Party Integrations

Shrine

diff --git a/gems/dry-monitor/main/third-party-integrations/index.html.gz b/gems/dry-monitor/main/third-party-integrations/index.html.gz index 3be8bfc05f..32fc913f91 100644 Binary files a/gems/dry-monitor/main/third-party-integrations/index.html.gz and b/gems/dry-monitor/main/third-party-integrations/index.html.gz differ diff --git a/gems/dry-rails/0.1/index.html b/gems/dry-rails/0.1/index.html index 0a56cae05c..3420962302 100644 --- a/gems/dry-rails/0.1/index.html +++ b/gems/dry-rails/0.1/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

+});

Introduction

Info
diff --git a/gems/dry-rails/0.1/index.html.gz b/gems/dry-rails/0.1/index.html.gz index c563497532..6efd0d2ceb 100644 Binary files a/gems/dry-rails/0.1/index.html.gz and b/gems/dry-rails/0.1/index.html.gz differ diff --git a/gems/dry-rails/0.2/index.html b/gems/dry-rails/0.2/index.html index 717da3dd2e..fb8aeefb65 100644 --- a/gems/dry-rails/0.2/index.html +++ b/gems/dry-rails/0.2/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

+});

Introduction

Info
diff --git a/gems/dry-rails/0.2/index.html.gz b/gems/dry-rails/0.2/index.html.gz index 8818b1e274..5a326c7f73 100644 Binary files a/gems/dry-rails/0.2/index.html.gz and b/gems/dry-rails/0.2/index.html.gz differ diff --git a/gems/dry-rails/0.3/index.html b/gems/dry-rails/0.3/index.html index f3891257b8..193f8c38ba 100644 --- a/gems/dry-rails/0.3/index.html +++ b/gems/dry-rails/0.3/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

+});

Introduction

Info
diff --git a/gems/dry-rails/0.3/index.html.gz b/gems/dry-rails/0.3/index.html.gz index 66ce4db653..e17f3ed25e 100644 Binary files a/gems/dry-rails/0.3/index.html.gz and b/gems/dry-rails/0.3/index.html.gz differ diff --git a/gems/dry-rails/0.4/index.html b/gems/dry-rails/0.4/index.html index 69e32ef8dd..11df29193e 100644 --- a/gems/dry-rails/0.4/index.html +++ b/gems/dry-rails/0.4/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

+});

Introduction

Info
diff --git a/gems/dry-rails/0.4/index.html.gz b/gems/dry-rails/0.4/index.html.gz index 4ad0286963..22d2f03b8b 100644 Binary files a/gems/dry-rails/0.4/index.html.gz and b/gems/dry-rails/0.4/index.html.gz differ diff --git a/gems/dry-rails/0.5/index.html b/gems/dry-rails/0.5/index.html index 3b98b663b1..82d44512e1 100644 --- a/gems/dry-rails/0.5/index.html +++ b/gems/dry-rails/0.5/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

+});

Introduction

Info
diff --git a/gems/dry-rails/0.5/index.html.gz b/gems/dry-rails/0.5/index.html.gz index 8ae69da856..88c82f755b 100644 Binary files a/gems/dry-rails/0.5/index.html.gz and b/gems/dry-rails/0.5/index.html.gz differ diff --git a/gems/dry-rails/0.6/index.html b/gems/dry-rails/0.6/index.html index 96193b80f4..eca61a2b99 100644 --- a/gems/dry-rails/0.6/index.html +++ b/gems/dry-rails/0.6/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

+});

Introduction

Info
diff --git a/gems/dry-rails/0.6/index.html.gz b/gems/dry-rails/0.6/index.html.gz index 7859bc4fa6..0926730b72 100644 Binary files a/gems/dry-rails/0.6/index.html.gz and b/gems/dry-rails/0.6/index.html.gz differ diff --git a/gems/dry-rails/0.7/index.html b/gems/dry-rails/0.7/index.html index ba0c9e163f..5767968ae2 100644 --- a/gems/dry-rails/0.7/index.html +++ b/gems/dry-rails/0.7/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

+});

Introduction

Info
diff --git a/gems/dry-rails/0.7/index.html.gz b/gems/dry-rails/0.7/index.html.gz index 741b4602bb..90b70d9b32 100644 Binary files a/gems/dry-rails/0.7/index.html.gz and b/gems/dry-rails/0.7/index.html.gz differ diff --git a/gems/dry-rails/index.html.gz b/gems/dry-rails/index.html.gz index 4b9d735e33..0ef8c9aa6c 100644 Binary files a/gems/dry-rails/index.html.gz and b/gems/dry-rails/index.html.gz differ diff --git a/gems/dry-rails/main/index.html b/gems/dry-rails/main/index.html index 5ec7a46c92..cbc2f86783 100644 --- a/gems/dry-rails/main/index.html +++ b/gems/dry-rails/main/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

+});

Introduction

Info
diff --git a/gems/dry-rails/main/index.html.gz b/gems/dry-rails/main/index.html.gz index ff0e5b9c9e..fba74b3527 100644 Binary files a/gems/dry-rails/main/index.html.gz and b/gems/dry-rails/main/index.html.gz differ diff --git a/gems/dry-schema/1.0/advanced/custom-types/index.html b/gems/dry-schema/1.0/advanced/custom-types/index.html index 73b58980c7..30deccde6a 100644 --- a/gems/dry-schema/1.0/advanced/custom-types/index.html +++ b/gems/dry-schema/1.0/advanced/custom-types/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

+});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

StrippedString = Types::String.constructor(&:strip)
 
 Schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.0/advanced/custom-types/index.html.gz b/gems/dry-schema/1.0/advanced/custom-types/index.html.gz
index 6830f8b783..e7a8f006da 100644
Binary files a/gems/dry-schema/1.0/advanced/custom-types/index.html.gz and b/gems/dry-schema/1.0/advanced/custom-types/index.html.gz differ
diff --git a/gems/dry-schema/1.0/advanced/filtering/index.html b/gems/dry-schema/1.0/advanced/filtering/index.html
index 07ff6797f4..92a819169d 100644
--- a/gems/dry-schema/1.0/advanced/filtering/index.html
+++ b/gems/dry-schema/1.0/advanced/filtering/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

+});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

Here's a common example - your system supports only one specific date format, and you want to validate that the input value has this format before trying to coerce it into a date object. In order to do that, you can use filter macro, which works just like value, but its predicates are applied before value coercion:

schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.0/advanced/filtering/index.html.gz b/gems/dry-schema/1.0/advanced/filtering/index.html.gz
index 5126595da3..870f730f6b 100644
Binary files a/gems/dry-schema/1.0/advanced/filtering/index.html.gz and b/gems/dry-schema/1.0/advanced/filtering/index.html.gz differ
diff --git a/gems/dry-schema/1.0/advanced/index.html b/gems/dry-schema/1.0/advanced/index.html
index 40baa95dac..9f3079ceee 100644
--- a/gems/dry-schema/1.0/advanced/index.html
+++ b/gems/dry-schema/1.0/advanced/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Advanced

  • Predicate Logic
  • Filtering
  • Key maps
  • diff --git a/gems/dry-schema/1.0/advanced/index.html.gz b/gems/dry-schema/1.0/advanced/index.html.gz index 068e63be40..2e8769b482 100644 Binary files a/gems/dry-schema/1.0/advanced/index.html.gz and b/gems/dry-schema/1.0/advanced/index.html.gz differ diff --git a/gems/dry-schema/1.0/advanced/key-maps/index.html b/gems/dry-schema/1.0/advanced/key-maps/index.html index eb37f3484b..ec8f0dcbe2 100644 --- a/gems/dry-schema/1.0/advanced/key-maps/index.html +++ b/gems/dry-schema/1.0/advanced/key-maps/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

+});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

  • Rebuild the original input hash by rejecting unknown keys
  • diff --git a/gems/dry-schema/1.0/advanced/key-maps/index.html.gz b/gems/dry-schema/1.0/advanced/key-maps/index.html.gz index 4168e4c951..ca3d5a8c09 100644 Binary files a/gems/dry-schema/1.0/advanced/key-maps/index.html.gz and b/gems/dry-schema/1.0/advanced/key-maps/index.html.gz differ diff --git a/gems/dry-schema/1.0/advanced/predicate-logic/index.html b/gems/dry-schema/1.0/advanced/predicate-logic/index.html index 0e81fd2fad..cb7e2db794 100644 --- a/gems/dry-schema/1.0/advanced/predicate-logic/index.html +++ b/gems/dry-schema/1.0/advanced/predicate-logic/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

+});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

This document explains how rule composition works in terms of predicate logic.

Rule AST

The DSL in dry-schema is used to create rule objects that are provided by dry-logic. These rules are built using an AST, which uses simple data structures to represent predicates and how they are composed into complex rules and operations.

+});

Built-in predicates

The DSL supports many built-in predicates that can be used to verify validity of the input. If the predicates do not meet your requirements, you probably want to look at dry-validation which offers a more advanced way of defining validations.

+});

Basics

Here's a basic example where we validate the following things:

  • The input must have a key called :email diff --git a/gems/dry-schema/1.0/basics/index.html.gz b/gems/dry-schema/1.0/basics/index.html.gz index b1cf39ce1d..737e9f2351 100644 Binary files a/gems/dry-schema/1.0/basics/index.html.gz and b/gems/dry-schema/1.0/basics/index.html.gz differ diff --git a/gems/dry-schema/1.0/basics/macros/index.html b/gems/dry-schema/1.0/basics/macros/index.html index 47ec130703..58c98418c6 100644 --- a/gems/dry-schema/1.0/basics/macros/index.html +++ b/gems/dry-schema/1.0/basics/macros/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Macros

Defining rules using blocks is very flexible and powerful; however, in most common cases repeatedly defining the same rules leads to boilerplate code. That's why dry-schema's DSL provides convenient macros to reduce that boilerplate. Every macro can be expanded to its block-based equivalent.

+});

Type specs

+});

Type specs

Warning
diff --git a/gems/dry-schema/1.0/basics/type-specs/index.html.gz b/gems/dry-schema/1.0/basics/type-specs/index.html.gz index 37e553187a..283133b388 100644 Binary files a/gems/dry-schema/1.0/basics/type-specs/index.html.gz and b/gems/dry-schema/1.0/basics/type-specs/index.html.gz differ diff --git a/gems/dry-schema/1.0/basics/working-with-schemas/index.html b/gems/dry-schema/1.0/basics/working-with-schemas/index.html index f33377b1be..3a250b2a66 100644 --- a/gems/dry-schema/1.0/basics/working-with-schemas/index.html +++ b/gems/dry-schema/1.0/basics/working-with-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

+});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

Schema definition best practices:

diff --git a/gems/dry-schema/1.0/basics/working-with-schemas/index.html.gz b/gems/dry-schema/1.0/basics/working-with-schemas/index.html.gz index 1b2b4c881d..beb42959ba 100644 Binary files a/gems/dry-schema/1.0/basics/working-with-schemas/index.html.gz and b/gems/dry-schema/1.0/basics/working-with-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.0/error-messages/index.html b/gems/dry-schema/1.0/error-messages/index.html index 3ea83b8b6f..7aacadc907 100644 --- a/gems/dry-schema/1.0/error-messages/index.html +++ b/gems/dry-schema/1.0/error-messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Error messages

By default dry-schema comes with a set of pre-defined error messages for every built-in predicate. They are defined in a yaml file which is shipped with the gem. This file is compatible with I18n format.

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

# enable :hints
 
 Dry::Schema.load_extensions(:hints)
diff --git a/gems/dry-schema/1.0/extensions/hints/index.html.gz b/gems/dry-schema/1.0/extensions/hints/index.html.gz
index 8992aab9f6..c178f58644 100644
Binary files a/gems/dry-schema/1.0/extensions/hints/index.html.gz and b/gems/dry-schema/1.0/extensions/hints/index.html.gz differ
diff --git a/gems/dry-schema/1.0/extensions/index.html b/gems/dry-schema/1.0/extensions/index.html
index 5b93191fc7..8442faab4b 100644
--- a/gems/dry-schema/1.0/extensions/index.html
+++ b/gems/dry-schema/1.0/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-schema can be extended with extension. Those extensions are loaded with Dry::Schema.load_extensions.

+});

Extensions

dry-schema can be extended with extension. Those extensions are loaded with Dry::Schema.load_extensions.

Available extensions:

diff --git a/gems/dry-schema/1.0/extensions/index.html.gz b/gems/dry-schema/1.0/extensions/index.html.gz index 7cbdb1fa6f..114855ef3d 100644 Binary files a/gems/dry-schema/1.0/extensions/index.html.gz and b/gems/dry-schema/1.0/extensions/index.html.gz differ diff --git a/gems/dry-schema/1.0/extensions/monads/index.html b/gems/dry-schema/1.0/extensions/monads/index.html index 4998d95626..571c81ca5f 100644 --- a/gems/dry-schema/1.0/extensions/monads/index.html +++ b/gems/dry-schema/1.0/extensions/monads/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Monads

The monads extension makes Dry::Schema::Result objects compatible with dry-monads.

To enable the extension:

require 'dry/schema'
diff --git a/gems/dry-schema/1.0/extensions/monads/index.html.gz b/gems/dry-schema/1.0/extensions/monads/index.html.gz
index d326f725ba..4dffde5338 100644
Binary files a/gems/dry-schema/1.0/extensions/monads/index.html.gz and b/gems/dry-schema/1.0/extensions/monads/index.html.gz differ
diff --git a/gems/dry-schema/1.0/index.html b/gems/dry-schema/1.0/index.html
index 574a4d88c8..ef555ae17d 100644
--- a/gems/dry-schema/1.0/index.html
+++ b/gems/dry-schema/1.0/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

+});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

Main focus of this library is on:

diff --git a/gems/dry-schema/1.0/index.html.gz b/gems/dry-schema/1.0/index.html.gz index 182d522ed9..d41eb0995c 100644 Binary files a/gems/dry-schema/1.0/index.html.gz and b/gems/dry-schema/1.0/index.html.gz differ diff --git a/gems/dry-schema/1.0/json/index.html b/gems/dry-schema/1.0/json/index.html index 38ced27f18..f91a69a076 100644 --- a/gems/dry-schema/1.0/json/index.html +++ b/gems/dry-schema/1.0/json/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

JSON

To validate JSON data structures, you can use JSON schemas. The difference between Params and JSON is coercion logic. Refer to dry-types documentation for more information about supported JSON coercions.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

+});

Params

Probably the most common use case is to validate HTTP params. This is a special kind of a validation for a couple of reasons:

+});

Params

Probably the most common use case is to validate HTTP params. This is a special kind of a validation for a couple of reasons:

  • The input is a hash with stringified keys
  • diff --git a/gems/dry-schema/1.0/params/index.html.gz b/gems/dry-schema/1.0/params/index.html.gz index cf98b0f8aa..041ad4d23f 100644 Binary files a/gems/dry-schema/1.0/params/index.html.gz and b/gems/dry-schema/1.0/params/index.html.gz differ diff --git a/gems/dry-schema/1.0/reusing-schemas/index.html b/gems/dry-schema/1.0/reusing-schemas/index.html index 3fc8298156..4db723c409 100644 --- a/gems/dry-schema/1.0/reusing-schemas/index.html +++ b/gems/dry-schema/1.0/reusing-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Reusing schemas

You can easily reuse existing schemas using nested-schema syntax:

AddressSchema = Dry::Schema.Params do
   required(:street).filled(:string)
   required(:city).filled(:string)
diff --git a/gems/dry-schema/1.0/reusing-schemas/index.html.gz b/gems/dry-schema/1.0/reusing-schemas/index.html.gz
index 04846ac557..62c9bb15ac 100644
Binary files a/gems/dry-schema/1.0/reusing-schemas/index.html.gz and b/gems/dry-schema/1.0/reusing-schemas/index.html.gz differ
diff --git a/gems/dry-schema/1.10/advanced/composing-schemas/index.html b/gems/dry-schema/1.10/advanced/composing-schemas/index.html
index 85f654deca..dabb111cd1 100644
--- a/gems/dry-schema/1.10/advanced/composing-schemas/index.html
+++ b/gems/dry-schema/1.10/advanced/composing-schemas/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Composing schemas

+});

Composing schemas

Warning
diff --git a/gems/dry-schema/1.10/advanced/composing-schemas/index.html.gz b/gems/dry-schema/1.10/advanced/composing-schemas/index.html.gz index 9a0d16b486..240456d6c1 100644 Binary files a/gems/dry-schema/1.10/advanced/composing-schemas/index.html.gz and b/gems/dry-schema/1.10/advanced/composing-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.10/advanced/custom-types/index.html b/gems/dry-schema/1.10/advanced/custom-types/index.html index 2e31084c40..891107790d 100644 --- a/gems/dry-schema/1.10/advanced/custom-types/index.html +++ b/gems/dry-schema/1.10/advanced/custom-types/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

+});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

StrippedString = Types::String.constructor(&:strip)
 
 Schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.10/advanced/custom-types/index.html.gz b/gems/dry-schema/1.10/advanced/custom-types/index.html.gz
index fc2cb4c3af..ae88d09a09 100644
Binary files a/gems/dry-schema/1.10/advanced/custom-types/index.html.gz and b/gems/dry-schema/1.10/advanced/custom-types/index.html.gz differ
diff --git a/gems/dry-schema/1.10/advanced/filtering/index.html b/gems/dry-schema/1.10/advanced/filtering/index.html
index e25dd2ef84..623e11f2c3 100644
--- a/gems/dry-schema/1.10/advanced/filtering/index.html
+++ b/gems/dry-schema/1.10/advanced/filtering/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

+});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

Here's a common example - your system supports only one specific date format, and you want to validate that the input value has this format before trying to coerce it into a date object. In order to do that, you can use filter macro, which works just like value, but its predicates are applied before value coercion:

schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.10/advanced/filtering/index.html.gz b/gems/dry-schema/1.10/advanced/filtering/index.html.gz
index 2a31407f4b..3c1d8321d6 100644
Binary files a/gems/dry-schema/1.10/advanced/filtering/index.html.gz and b/gems/dry-schema/1.10/advanced/filtering/index.html.gz differ
diff --git a/gems/dry-schema/1.10/advanced/index.html b/gems/dry-schema/1.10/advanced/index.html
index 7fca50ba19..9050b4a0b4 100644
--- a/gems/dry-schema/1.10/advanced/index.html
+++ b/gems/dry-schema/1.10/advanced/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Advanced

  • Predicate Logic
  • Composing schemas
  • Unexpected keys
  • diff --git a/gems/dry-schema/1.10/advanced/index.html.gz b/gems/dry-schema/1.10/advanced/index.html.gz index 43eeaadd86..37ecd5bf2e 100644 Binary files a/gems/dry-schema/1.10/advanced/index.html.gz and b/gems/dry-schema/1.10/advanced/index.html.gz differ diff --git a/gems/dry-schema/1.10/advanced/key-maps/index.html b/gems/dry-schema/1.10/advanced/key-maps/index.html index 5292130426..8287dddd9d 100644 --- a/gems/dry-schema/1.10/advanced/key-maps/index.html +++ b/gems/dry-schema/1.10/advanced/key-maps/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

+});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

  • Rebuild the original input hash by rejecting unknown keys
  • diff --git a/gems/dry-schema/1.10/advanced/key-maps/index.html.gz b/gems/dry-schema/1.10/advanced/key-maps/index.html.gz index 2d81f10903..9f5eea442c 100644 Binary files a/gems/dry-schema/1.10/advanced/key-maps/index.html.gz and b/gems/dry-schema/1.10/advanced/key-maps/index.html.gz differ diff --git a/gems/dry-schema/1.10/advanced/predicate-logic/index.html b/gems/dry-schema/1.10/advanced/predicate-logic/index.html index 56f140efd1..ebcfac7223 100644 --- a/gems/dry-schema/1.10/advanced/predicate-logic/index.html +++ b/gems/dry-schema/1.10/advanced/predicate-logic/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

+});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

This document explains how rule composition works in terms of predicate logic.

Processor steps

+});

Processor steps

Warning
diff --git a/gems/dry-schema/1.10/advanced/processor-steps/index.html.gz b/gems/dry-schema/1.10/advanced/processor-steps/index.html.gz index a48e3c26a0..217000ef09 100644 Binary files a/gems/dry-schema/1.10/advanced/processor-steps/index.html.gz and b/gems/dry-schema/1.10/advanced/processor-steps/index.html.gz differ diff --git a/gems/dry-schema/1.10/advanced/rule-ast/index.html b/gems/dry-schema/1.10/advanced/rule-ast/index.html index a91529e5f7..5f5e9b74c7 100644 --- a/gems/dry-schema/1.10/advanced/rule-ast/index.html +++ b/gems/dry-schema/1.10/advanced/rule-ast/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Rule AST

The DSL in dry-schema is used to create rule objects that are provided by dry-logic. These rules are built using an AST, which uses simple data structures to represent predicates and how they are composed into complex rules and operations.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

In order to use this type of validation, you need to enable it via config:

# Enable it globally
diff --git a/gems/dry-schema/1.10/advanced/unexpected-keys/index.html.gz b/gems/dry-schema/1.10/advanced/unexpected-keys/index.html.gz
index 4ac0864c49..5c974361b5 100644
Binary files a/gems/dry-schema/1.10/advanced/unexpected-keys/index.html.gz and b/gems/dry-schema/1.10/advanced/unexpected-keys/index.html.gz differ
diff --git a/gems/dry-schema/1.10/basics/built-in-predicates/index.html b/gems/dry-schema/1.10/basics/built-in-predicates/index.html
index 44633589b0..fa403b71bc 100644
--- a/gems/dry-schema/1.10/basics/built-in-predicates/index.html
+++ b/gems/dry-schema/1.10/basics/built-in-predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in predicates

The DSL supports many built-in predicates that can be used to verify validity of the input. If the predicates do not meet your requirements, you probably want to look at dry-validation which offers a more advanced way of defining validations.

+});

Basics

Here's a basic example where we validate the following things:

  • The input must have a key called :email diff --git a/gems/dry-schema/1.10/basics/index.html.gz b/gems/dry-schema/1.10/basics/index.html.gz index b8275e5b03..c68f1d2162 100644 Binary files a/gems/dry-schema/1.10/basics/index.html.gz and b/gems/dry-schema/1.10/basics/index.html.gz differ diff --git a/gems/dry-schema/1.10/basics/macros/index.html b/gems/dry-schema/1.10/basics/macros/index.html index cdb18273d8..71f97152f4 100644 --- a/gems/dry-schema/1.10/basics/macros/index.html +++ b/gems/dry-schema/1.10/basics/macros/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Macros

Defining rules using blocks is very flexible and powerful; however, in most common cases repeatedly defining the same rules leads to boilerplate code. That's why dry-schema's DSL provides convenient macros to reduce that boilerplate. Every macro can be expanded to its block-based equivalent.

+});

Type specs

+});

Type specs

Warning
diff --git a/gems/dry-schema/1.10/basics/type-specs/index.html.gz b/gems/dry-schema/1.10/basics/type-specs/index.html.gz index 285680d4b1..7c79371343 100644 Binary files a/gems/dry-schema/1.10/basics/type-specs/index.html.gz and b/gems/dry-schema/1.10/basics/type-specs/index.html.gz differ diff --git a/gems/dry-schema/1.10/basics/working-with-schemas/index.html b/gems/dry-schema/1.10/basics/working-with-schemas/index.html index 9ea138e4af..3af4e9a43f 100644 --- a/gems/dry-schema/1.10/basics/working-with-schemas/index.html +++ b/gems/dry-schema/1.10/basics/working-with-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

+});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

Schema definition best practices:

diff --git a/gems/dry-schema/1.10/basics/working-with-schemas/index.html.gz b/gems/dry-schema/1.10/basics/working-with-schemas/index.html.gz index 312b4ff64b..4e3d73bd5f 100644 Binary files a/gems/dry-schema/1.10/basics/working-with-schemas/index.html.gz and b/gems/dry-schema/1.10/basics/working-with-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.10/error-messages/index.html b/gems/dry-schema/1.10/error-messages/index.html index 20cb4ede94..40475e2a4b 100644 --- a/gems/dry-schema/1.10/error-messages/index.html +++ b/gems/dry-schema/1.10/error-messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Error messages

By default dry-schema comes with a set of pre-defined error messages for every built-in predicate. They are defined in a yaml file which is shipped with the gem. This file is compatible with I18n format.

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

# enable :hints
 
 Dry::Schema.load_extensions(:hints)
diff --git a/gems/dry-schema/1.10/extensions/hints/index.html.gz b/gems/dry-schema/1.10/extensions/hints/index.html.gz
index c8f444368c..0a7d0cb9a3 100644
Binary files a/gems/dry-schema/1.10/extensions/hints/index.html.gz and b/gems/dry-schema/1.10/extensions/hints/index.html.gz differ
diff --git a/gems/dry-schema/1.10/extensions/index.html b/gems/dry-schema/1.10/extensions/index.html
index f560a22685..e8e60c7f57 100644
--- a/gems/dry-schema/1.10/extensions/index.html
+++ b/gems/dry-schema/1.10/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-schema can be extended with extension. Those extensions are loaded with Dry::Schema.load_extensions.

Available extensions:

diff --git a/gems/dry-schema/1.10/extensions/index.html.gz b/gems/dry-schema/1.10/extensions/index.html.gz index ef2d045777..d88ba18f43 100644 Binary files a/gems/dry-schema/1.10/extensions/index.html.gz and b/gems/dry-schema/1.10/extensions/index.html.gz differ diff --git a/gems/dry-schema/1.10/extensions/info/index.html b/gems/dry-schema/1.10/extensions/info/index.html index f9564f9ec6..3bf6f0b5a8 100644 --- a/gems/dry-schema/1.10/extensions/info/index.html +++ b/gems/dry-schema/1.10/extensions/info/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

+});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

WARN The info data structure is not stable yet and may change before 2.0.0 depending on the user feedback. diff --git a/gems/dry-schema/1.10/extensions/info/index.html.gz b/gems/dry-schema/1.10/extensions/info/index.html.gz index 8c79a08ca2..27bbe450f7 100644 Binary files a/gems/dry-schema/1.10/extensions/info/index.html.gz and b/gems/dry-schema/1.10/extensions/info/index.html.gz differ diff --git a/gems/dry-schema/1.10/extensions/json_schema/index.html b/gems/dry-schema/1.10/extensions/json_schema/index.html index 90ee99806e..6ed82f5fa9 100644 --- a/gems/dry-schema/1.10/extensions/json_schema/index.html +++ b/gems/dry-schema/1.10/extensions/json_schema/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

JSON Schema

The :json_schema extension allows you to generate a valid JSON Schema from a Dry::Schema. JSON Schema is a widely used standard, so this unlocks many possibilities.

+});

JSON Schema

The :json_schema extension allows you to generate a valid JSON Schema from a Dry::Schema. JSON Schema is a widely used standard, so this unlocks many possibilities.

Dry::Schema.load_extensions(:json_schema)
 
 UserSchema = Dry::Schema.JSON do
diff --git a/gems/dry-schema/1.10/extensions/json_schema/index.html.gz b/gems/dry-schema/1.10/extensions/json_schema/index.html.gz
index 5797338dbd..a24a2d3403 100644
Binary files a/gems/dry-schema/1.10/extensions/json_schema/index.html.gz and b/gems/dry-schema/1.10/extensions/json_schema/index.html.gz differ
diff --git a/gems/dry-schema/1.10/extensions/monads/index.html b/gems/dry-schema/1.10/extensions/monads/index.html
index 9d4bb38834..9efe9c2632 100644
--- a/gems/dry-schema/1.10/extensions/monads/index.html
+++ b/gems/dry-schema/1.10/extensions/monads/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Monads

The monads extension makes Dry::Schema::Result objects compatible with dry-monads.

To enable the extension:

require 'dry/schema'
diff --git a/gems/dry-schema/1.10/extensions/monads/index.html.gz b/gems/dry-schema/1.10/extensions/monads/index.html.gz
index 418d925f95..565d826ab8 100644
Binary files a/gems/dry-schema/1.10/extensions/monads/index.html.gz and b/gems/dry-schema/1.10/extensions/monads/index.html.gz differ
diff --git a/gems/dry-schema/1.10/index.html b/gems/dry-schema/1.10/index.html
index c0c2d1e2f1..1b3a922ec1 100644
--- a/gems/dry-schema/1.10/index.html
+++ b/gems/dry-schema/1.10/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

+});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

Main focus of this library is on:

diff --git a/gems/dry-schema/1.10/index.html.gz b/gems/dry-schema/1.10/index.html.gz index fff4888716..d071bedd98 100644 Binary files a/gems/dry-schema/1.10/index.html.gz and b/gems/dry-schema/1.10/index.html.gz differ diff --git a/gems/dry-schema/1.10/json/index.html b/gems/dry-schema/1.10/json/index.html index a7d62aa70a..8758bfef68 100644 --- a/gems/dry-schema/1.10/json/index.html +++ b/gems/dry-schema/1.10/json/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

JSON

To validate JSON data structures, you can use JSON schemas. The difference between Params and JSON is coercion logic. Refer to dry-types documentation for more information about supported JSON coercions.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

This also comes with the benefit of being explicit about the type expectation. In the example below we explicitly state that :age can be omitted or if present it must be an integer and it must be greater than 18.

Params

Probably the most common use case is to validate HTTP params. This is a special kind of a validation for a couple of reasons:

  • The input is a hash with stringified keys
  • diff --git a/gems/dry-schema/1.10/params/index.html.gz b/gems/dry-schema/1.10/params/index.html.gz index a041c7ca13..b59105149a 100644 Binary files a/gems/dry-schema/1.10/params/index.html.gz and b/gems/dry-schema/1.10/params/index.html.gz differ diff --git a/gems/dry-schema/1.10/reusing-schemas/index.html b/gems/dry-schema/1.10/reusing-schemas/index.html index e89cd47b5a..2cc6514cf7 100644 --- a/gems/dry-schema/1.10/reusing-schemas/index.html +++ b/gems/dry-schema/1.10/reusing-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Reusing schemas

You can easily reuse existing schemas using nested-schema syntax:

AddressSchema = Dry::Schema.Params do
   required(:street).filled(:string)
   required(:city).filled(:string)
diff --git a/gems/dry-schema/1.10/reusing-schemas/index.html.gz b/gems/dry-schema/1.10/reusing-schemas/index.html.gz
index 472e77b083..5f0ae574c0 100644
Binary files a/gems/dry-schema/1.10/reusing-schemas/index.html.gz and b/gems/dry-schema/1.10/reusing-schemas/index.html.gz differ
diff --git a/gems/dry-schema/1.11/advanced/composing-schemas/index.html b/gems/dry-schema/1.11/advanced/composing-schemas/index.html
index a32b79f4cb..d7a1c3d6ca 100644
--- a/gems/dry-schema/1.11/advanced/composing-schemas/index.html
+++ b/gems/dry-schema/1.11/advanced/composing-schemas/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Composing schemas

+});

Composing schemas

Warning
diff --git a/gems/dry-schema/1.11/advanced/composing-schemas/index.html.gz b/gems/dry-schema/1.11/advanced/composing-schemas/index.html.gz index 6212fd5836..ec13995208 100644 Binary files a/gems/dry-schema/1.11/advanced/composing-schemas/index.html.gz and b/gems/dry-schema/1.11/advanced/composing-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.11/advanced/custom-types/index.html b/gems/dry-schema/1.11/advanced/custom-types/index.html index 97dc1c01ba..17c5ac20fb 100644 --- a/gems/dry-schema/1.11/advanced/custom-types/index.html +++ b/gems/dry-schema/1.11/advanced/custom-types/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

+});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

StrippedString = Types::String.constructor(&:strip)
 
 Schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.11/advanced/custom-types/index.html.gz b/gems/dry-schema/1.11/advanced/custom-types/index.html.gz
index de8aa71984..c3874639b9 100644
Binary files a/gems/dry-schema/1.11/advanced/custom-types/index.html.gz and b/gems/dry-schema/1.11/advanced/custom-types/index.html.gz differ
diff --git a/gems/dry-schema/1.11/advanced/filtering/index.html b/gems/dry-schema/1.11/advanced/filtering/index.html
index a12fa89557..fbcaa0541c 100644
--- a/gems/dry-schema/1.11/advanced/filtering/index.html
+++ b/gems/dry-schema/1.11/advanced/filtering/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

+});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

Here's a common example - your system supports only one specific date format, and you want to validate that the input value has this format before trying to coerce it into a date object. In order to do that, you can use filter macro, which works just like value, but its predicates are applied before value coercion:

schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.11/advanced/filtering/index.html.gz b/gems/dry-schema/1.11/advanced/filtering/index.html.gz
index 785507ca92..58b1db2403 100644
Binary files a/gems/dry-schema/1.11/advanced/filtering/index.html.gz and b/gems/dry-schema/1.11/advanced/filtering/index.html.gz differ
diff --git a/gems/dry-schema/1.11/advanced/index.html b/gems/dry-schema/1.11/advanced/index.html
index 050da60cab..eda5a1e068 100644
--- a/gems/dry-schema/1.11/advanced/index.html
+++ b/gems/dry-schema/1.11/advanced/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Advanced

  • Predicate Logic
  • Composing schemas
  • Unexpected keys
  • diff --git a/gems/dry-schema/1.11/advanced/index.html.gz b/gems/dry-schema/1.11/advanced/index.html.gz index befba044e5..31fd72652e 100644 Binary files a/gems/dry-schema/1.11/advanced/index.html.gz and b/gems/dry-schema/1.11/advanced/index.html.gz differ diff --git a/gems/dry-schema/1.11/advanced/key-maps/index.html b/gems/dry-schema/1.11/advanced/key-maps/index.html index 3c16ede1f2..946aafb840 100644 --- a/gems/dry-schema/1.11/advanced/key-maps/index.html +++ b/gems/dry-schema/1.11/advanced/key-maps/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

+});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

  • Rebuild the original input hash by rejecting unknown keys
  • diff --git a/gems/dry-schema/1.11/advanced/key-maps/index.html.gz b/gems/dry-schema/1.11/advanced/key-maps/index.html.gz index 158f22efcb..151c7c68b9 100644 Binary files a/gems/dry-schema/1.11/advanced/key-maps/index.html.gz and b/gems/dry-schema/1.11/advanced/key-maps/index.html.gz differ diff --git a/gems/dry-schema/1.11/advanced/predicate-logic/index.html b/gems/dry-schema/1.11/advanced/predicate-logic/index.html index 1dfeb9b9ef..3b43aad443 100644 --- a/gems/dry-schema/1.11/advanced/predicate-logic/index.html +++ b/gems/dry-schema/1.11/advanced/predicate-logic/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

+});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

This document explains how rule composition works in terms of predicate logic.

Processor steps

+});

Processor steps

Warning
diff --git a/gems/dry-schema/1.11/advanced/processor-steps/index.html.gz b/gems/dry-schema/1.11/advanced/processor-steps/index.html.gz index 1244cd27ff..1af0214d72 100644 Binary files a/gems/dry-schema/1.11/advanced/processor-steps/index.html.gz and b/gems/dry-schema/1.11/advanced/processor-steps/index.html.gz differ diff --git a/gems/dry-schema/1.11/advanced/rule-ast/index.html b/gems/dry-schema/1.11/advanced/rule-ast/index.html index 3e3e3c0b3a..cc9658ee3e 100644 --- a/gems/dry-schema/1.11/advanced/rule-ast/index.html +++ b/gems/dry-schema/1.11/advanced/rule-ast/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Rule AST

The DSL in dry-schema is used to create rule objects that are provided by dry-logic. These rules are built using an AST, which uses simple data structures to represent predicates and how they are composed into complex rules and operations.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

In order to use this type of validation, you need to enable it via config:

# Enable it globally
diff --git a/gems/dry-schema/1.11/advanced/unexpected-keys/index.html.gz b/gems/dry-schema/1.11/advanced/unexpected-keys/index.html.gz
index 0318c3cd35..29ef996f78 100644
Binary files a/gems/dry-schema/1.11/advanced/unexpected-keys/index.html.gz and b/gems/dry-schema/1.11/advanced/unexpected-keys/index.html.gz differ
diff --git a/gems/dry-schema/1.11/basics/built-in-predicates/index.html b/gems/dry-schema/1.11/basics/built-in-predicates/index.html
index 40749931c2..9fef7ed7c7 100644
--- a/gems/dry-schema/1.11/basics/built-in-predicates/index.html
+++ b/gems/dry-schema/1.11/basics/built-in-predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in predicates

The DSL supports many built-in predicates that can be used to verify validity of the input. If the predicates do not meet your requirements, you probably want to look at dry-validation which offers a more advanced way of defining validations.

+});

Basics

Here's a basic example where we validate the following things:

  • The input must have a key called :email diff --git a/gems/dry-schema/1.11/basics/index.html.gz b/gems/dry-schema/1.11/basics/index.html.gz index 66c3fb2062..b7ae9d094f 100644 Binary files a/gems/dry-schema/1.11/basics/index.html.gz and b/gems/dry-schema/1.11/basics/index.html.gz differ diff --git a/gems/dry-schema/1.11/basics/macros/index.html b/gems/dry-schema/1.11/basics/macros/index.html index d945d9b6d7..ea52306b0b 100644 --- a/gems/dry-schema/1.11/basics/macros/index.html +++ b/gems/dry-schema/1.11/basics/macros/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Macros

Defining rules using blocks is very flexible and powerful; however, in most common cases repeatedly defining the same rules leads to boilerplate code. That's why dry-schema's DSL provides convenient macros to reduce that boilerplate. Every macro can be expanded to its block-based equivalent.

+});

Type specs

+});

Type specs

Warning
diff --git a/gems/dry-schema/1.11/basics/type-specs/index.html.gz b/gems/dry-schema/1.11/basics/type-specs/index.html.gz index 7ab089b094..089497d701 100644 Binary files a/gems/dry-schema/1.11/basics/type-specs/index.html.gz and b/gems/dry-schema/1.11/basics/type-specs/index.html.gz differ diff --git a/gems/dry-schema/1.11/basics/working-with-schemas/index.html b/gems/dry-schema/1.11/basics/working-with-schemas/index.html index d725c98ea2..bf5e090d4a 100644 --- a/gems/dry-schema/1.11/basics/working-with-schemas/index.html +++ b/gems/dry-schema/1.11/basics/working-with-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

+});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

Schema definition best practices:

diff --git a/gems/dry-schema/1.11/basics/working-with-schemas/index.html.gz b/gems/dry-schema/1.11/basics/working-with-schemas/index.html.gz index 672c01806a..2f31de4221 100644 Binary files a/gems/dry-schema/1.11/basics/working-with-schemas/index.html.gz and b/gems/dry-schema/1.11/basics/working-with-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.11/error-messages/index.html b/gems/dry-schema/1.11/error-messages/index.html index 1590175766..bf2fa9c3f7 100644 --- a/gems/dry-schema/1.11/error-messages/index.html +++ b/gems/dry-schema/1.11/error-messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Error messages

By default dry-schema comes with a set of pre-defined error messages for every built-in predicate. They are defined in a yaml file which is shipped with the gem. This file is compatible with I18n format.

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

# enable :hints
 
 Dry::Schema.load_extensions(:hints)
diff --git a/gems/dry-schema/1.11/extensions/hints/index.html.gz b/gems/dry-schema/1.11/extensions/hints/index.html.gz
index e66480bc74..fd7055c78c 100644
Binary files a/gems/dry-schema/1.11/extensions/hints/index.html.gz and b/gems/dry-schema/1.11/extensions/hints/index.html.gz differ
diff --git a/gems/dry-schema/1.11/extensions/index.html b/gems/dry-schema/1.11/extensions/index.html
index 7c83c48b95..df5585ce23 100644
--- a/gems/dry-schema/1.11/extensions/index.html
+++ b/gems/dry-schema/1.11/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-schema can be extended with extension. Those extensions are loaded with Dry::Schema.load_extensions.

Available extensions:

diff --git a/gems/dry-schema/1.11/extensions/index.html.gz b/gems/dry-schema/1.11/extensions/index.html.gz index f3cbb96e30..a15fab4747 100644 Binary files a/gems/dry-schema/1.11/extensions/index.html.gz and b/gems/dry-schema/1.11/extensions/index.html.gz differ diff --git a/gems/dry-schema/1.11/extensions/info/index.html b/gems/dry-schema/1.11/extensions/info/index.html index 156e8224e6..49319820ab 100644 --- a/gems/dry-schema/1.11/extensions/info/index.html +++ b/gems/dry-schema/1.11/extensions/info/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

+});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

WARN The info data structure is not stable yet and may change before 2.0.0 depending on the user feedback. diff --git a/gems/dry-schema/1.11/extensions/info/index.html.gz b/gems/dry-schema/1.11/extensions/info/index.html.gz index 18c8f0a78c..02968370e7 100644 Binary files a/gems/dry-schema/1.11/extensions/info/index.html.gz and b/gems/dry-schema/1.11/extensions/info/index.html.gz differ diff --git a/gems/dry-schema/1.11/extensions/json_schema/index.html b/gems/dry-schema/1.11/extensions/json_schema/index.html index 90777258fa..91828c9007 100644 --- a/gems/dry-schema/1.11/extensions/json_schema/index.html +++ b/gems/dry-schema/1.11/extensions/json_schema/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

JSON Schema

The :json_schema extension allows you to generate a valid JSON Schema from a Dry::Schema. JSON Schema is a widely used standard, so this unlocks many possibilities.

+});

JSON Schema

The :json_schema extension allows you to generate a valid JSON Schema from a Dry::Schema. JSON Schema is a widely used standard, so this unlocks many possibilities.

Dry::Schema.load_extensions(:json_schema)
 
 UserSchema = Dry::Schema.JSON do
diff --git a/gems/dry-schema/1.11/extensions/json_schema/index.html.gz b/gems/dry-schema/1.11/extensions/json_schema/index.html.gz
index 94225eeaff..8a7d587884 100644
Binary files a/gems/dry-schema/1.11/extensions/json_schema/index.html.gz and b/gems/dry-schema/1.11/extensions/json_schema/index.html.gz differ
diff --git a/gems/dry-schema/1.11/extensions/monads/index.html b/gems/dry-schema/1.11/extensions/monads/index.html
index 08bca64806..cda9edbebe 100644
--- a/gems/dry-schema/1.11/extensions/monads/index.html
+++ b/gems/dry-schema/1.11/extensions/monads/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Monads

The monads extension makes Dry::Schema::Result objects compatible with dry-monads.

To enable the extension:

require 'dry/schema'
diff --git a/gems/dry-schema/1.11/extensions/monads/index.html.gz b/gems/dry-schema/1.11/extensions/monads/index.html.gz
index 30c25cbede..fc7dbb30c4 100644
Binary files a/gems/dry-schema/1.11/extensions/monads/index.html.gz and b/gems/dry-schema/1.11/extensions/monads/index.html.gz differ
diff --git a/gems/dry-schema/1.11/index.html b/gems/dry-schema/1.11/index.html
index 73c3bc4a30..8c2962ea81 100644
--- a/gems/dry-schema/1.11/index.html
+++ b/gems/dry-schema/1.11/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

+});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

Main focus of this library is on:

diff --git a/gems/dry-schema/1.11/index.html.gz b/gems/dry-schema/1.11/index.html.gz index b95fc33d9a..75b1255803 100644 Binary files a/gems/dry-schema/1.11/index.html.gz and b/gems/dry-schema/1.11/index.html.gz differ diff --git a/gems/dry-schema/1.11/json/index.html b/gems/dry-schema/1.11/json/index.html index 36fcbdd37e..612b3b465a 100644 --- a/gems/dry-schema/1.11/json/index.html +++ b/gems/dry-schema/1.11/json/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

JSON

To validate JSON data structures, you can use JSON schemas. The difference between Params and JSON is coercion logic. Refer to dry-types documentation for more information about supported JSON coercions.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

This also comes with the benefit of being explicit about the type expectation. In the example below we explicitly state that :age can be omitted or if present it must be an integer and it must be greater than 18.

Params

Probably the most common use case is to validate HTTP params. This is a special kind of a validation for a couple of reasons:

  • The input is a hash with stringified keys
  • diff --git a/gems/dry-schema/1.11/params/index.html.gz b/gems/dry-schema/1.11/params/index.html.gz index 533ec20e34..4ce521b80b 100644 Binary files a/gems/dry-schema/1.11/params/index.html.gz and b/gems/dry-schema/1.11/params/index.html.gz differ diff --git a/gems/dry-schema/1.11/reusing-schemas/index.html b/gems/dry-schema/1.11/reusing-schemas/index.html index 779ef84002..788cca8afc 100644 --- a/gems/dry-schema/1.11/reusing-schemas/index.html +++ b/gems/dry-schema/1.11/reusing-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Reusing schemas

You can easily reuse existing schemas using nested-schema syntax:

AddressSchema = Dry::Schema.Params do
   required(:street).filled(:string)
   required(:city).filled(:string)
diff --git a/gems/dry-schema/1.11/reusing-schemas/index.html.gz b/gems/dry-schema/1.11/reusing-schemas/index.html.gz
index 0990c20c2d..d8bb591925 100644
Binary files a/gems/dry-schema/1.11/reusing-schemas/index.html.gz and b/gems/dry-schema/1.11/reusing-schemas/index.html.gz differ
diff --git a/gems/dry-schema/1.12/advanced/composing-schemas/index.html b/gems/dry-schema/1.12/advanced/composing-schemas/index.html
index e844592984..fcec69e4af 100644
--- a/gems/dry-schema/1.12/advanced/composing-schemas/index.html
+++ b/gems/dry-schema/1.12/advanced/composing-schemas/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Composing schemas

+});

Composing schemas

Warning
diff --git a/gems/dry-schema/1.12/advanced/composing-schemas/index.html.gz b/gems/dry-schema/1.12/advanced/composing-schemas/index.html.gz index 784f96704b..ed0177cc3b 100644 Binary files a/gems/dry-schema/1.12/advanced/composing-schemas/index.html.gz and b/gems/dry-schema/1.12/advanced/composing-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.12/advanced/custom-types/index.html b/gems/dry-schema/1.12/advanced/custom-types/index.html index cd38b3364f..d1e4134ff0 100644 --- a/gems/dry-schema/1.12/advanced/custom-types/index.html +++ b/gems/dry-schema/1.12/advanced/custom-types/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

+});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

StrippedString = Types::String.constructor(&:strip)
 
 Schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.12/advanced/custom-types/index.html.gz b/gems/dry-schema/1.12/advanced/custom-types/index.html.gz
index 9aee434f85..8cb7710009 100644
Binary files a/gems/dry-schema/1.12/advanced/custom-types/index.html.gz and b/gems/dry-schema/1.12/advanced/custom-types/index.html.gz differ
diff --git a/gems/dry-schema/1.12/advanced/filtering/index.html b/gems/dry-schema/1.12/advanced/filtering/index.html
index 278e72233b..7026e5ae36 100644
--- a/gems/dry-schema/1.12/advanced/filtering/index.html
+++ b/gems/dry-schema/1.12/advanced/filtering/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

+});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

Here's a common example - your system supports only one specific date format, and you want to validate that the input value has this format before trying to coerce it into a date object. In order to do that, you can use filter macro, which works just like value, but its predicates are applied before value coercion:

schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.12/advanced/filtering/index.html.gz b/gems/dry-schema/1.12/advanced/filtering/index.html.gz
index 7350fb8769..8ca4a29282 100644
Binary files a/gems/dry-schema/1.12/advanced/filtering/index.html.gz and b/gems/dry-schema/1.12/advanced/filtering/index.html.gz differ
diff --git a/gems/dry-schema/1.12/advanced/index.html b/gems/dry-schema/1.12/advanced/index.html
index ea03784b38..62b9867cfb 100644
--- a/gems/dry-schema/1.12/advanced/index.html
+++ b/gems/dry-schema/1.12/advanced/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Advanced

  • Predicate Logic
  • Composing schemas
  • Unexpected keys
  • diff --git a/gems/dry-schema/1.12/advanced/index.html.gz b/gems/dry-schema/1.12/advanced/index.html.gz index ede92205d7..18b63abdf2 100644 Binary files a/gems/dry-schema/1.12/advanced/index.html.gz and b/gems/dry-schema/1.12/advanced/index.html.gz differ diff --git a/gems/dry-schema/1.12/advanced/key-maps/index.html b/gems/dry-schema/1.12/advanced/key-maps/index.html index 19d8a296e3..08e2354544 100644 --- a/gems/dry-schema/1.12/advanced/key-maps/index.html +++ b/gems/dry-schema/1.12/advanced/key-maps/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

+});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

  • Rebuild the original input hash by rejecting unknown keys
  • diff --git a/gems/dry-schema/1.12/advanced/key-maps/index.html.gz b/gems/dry-schema/1.12/advanced/key-maps/index.html.gz index 710a987862..87f37f8b9b 100644 Binary files a/gems/dry-schema/1.12/advanced/key-maps/index.html.gz and b/gems/dry-schema/1.12/advanced/key-maps/index.html.gz differ diff --git a/gems/dry-schema/1.12/advanced/predicate-logic/index.html b/gems/dry-schema/1.12/advanced/predicate-logic/index.html index 019879d7d7..b8a0af81a1 100644 --- a/gems/dry-schema/1.12/advanced/predicate-logic/index.html +++ b/gems/dry-schema/1.12/advanced/predicate-logic/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

+});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

This document explains how rule composition works in terms of predicate logic.

Processor steps

+});

Processor steps

Warning
diff --git a/gems/dry-schema/1.12/advanced/processor-steps/index.html.gz b/gems/dry-schema/1.12/advanced/processor-steps/index.html.gz index 0d6381cb6b..5d8ec75c10 100644 Binary files a/gems/dry-schema/1.12/advanced/processor-steps/index.html.gz and b/gems/dry-schema/1.12/advanced/processor-steps/index.html.gz differ diff --git a/gems/dry-schema/1.12/advanced/rule-ast/index.html b/gems/dry-schema/1.12/advanced/rule-ast/index.html index 4042fd0a58..3631759e3b 100644 --- a/gems/dry-schema/1.12/advanced/rule-ast/index.html +++ b/gems/dry-schema/1.12/advanced/rule-ast/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Rule AST

The DSL in dry-schema is used to create rule objects that are provided by dry-logic. These rules are built using an AST, which uses simple data structures to represent predicates and how they are composed into complex rules and operations.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

In order to use this type of validation, you need to enable it via config:

# Enable it globally
diff --git a/gems/dry-schema/1.12/advanced/unexpected-keys/index.html.gz b/gems/dry-schema/1.12/advanced/unexpected-keys/index.html.gz
index 3925a1c462..03a884529d 100644
Binary files a/gems/dry-schema/1.12/advanced/unexpected-keys/index.html.gz and b/gems/dry-schema/1.12/advanced/unexpected-keys/index.html.gz differ
diff --git a/gems/dry-schema/1.12/basics/built-in-predicates/index.html b/gems/dry-schema/1.12/basics/built-in-predicates/index.html
index 05c8488b7c..3e8b920bb6 100644
--- a/gems/dry-schema/1.12/basics/built-in-predicates/index.html
+++ b/gems/dry-schema/1.12/basics/built-in-predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in predicates

The DSL supports many built-in predicates that can be used to verify validity of the input. If the predicates do not meet your requirements, you probably want to look at dry-validation which offers a more advanced way of defining validations.

+});

Basics

Here's a basic example where we validate the following things:

  • The input must have a key called :email diff --git a/gems/dry-schema/1.12/basics/index.html.gz b/gems/dry-schema/1.12/basics/index.html.gz index a869324f80..491b4a00a1 100644 Binary files a/gems/dry-schema/1.12/basics/index.html.gz and b/gems/dry-schema/1.12/basics/index.html.gz differ diff --git a/gems/dry-schema/1.12/basics/macros/index.html b/gems/dry-schema/1.12/basics/macros/index.html index 3fe9b90cbc..40399b6fca 100644 --- a/gems/dry-schema/1.12/basics/macros/index.html +++ b/gems/dry-schema/1.12/basics/macros/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Macros

Defining rules using blocks is very flexible and powerful; however, in most common cases repeatedly defining the same rules leads to boilerplate code. That's why dry-schema's DSL provides convenient macros to reduce that boilerplate. Every macro can be expanded to its block-based equivalent.

+});

Type specs

+});

Type specs

Warning
diff --git a/gems/dry-schema/1.12/basics/type-specs/index.html.gz b/gems/dry-schema/1.12/basics/type-specs/index.html.gz index 5f6fe668cf..9fafd2e851 100644 Binary files a/gems/dry-schema/1.12/basics/type-specs/index.html.gz and b/gems/dry-schema/1.12/basics/type-specs/index.html.gz differ diff --git a/gems/dry-schema/1.12/basics/working-with-schemas/index.html b/gems/dry-schema/1.12/basics/working-with-schemas/index.html index 2276375d57..6fc240cd44 100644 --- a/gems/dry-schema/1.12/basics/working-with-schemas/index.html +++ b/gems/dry-schema/1.12/basics/working-with-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

+});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

Schema definition best practices:

diff --git a/gems/dry-schema/1.12/basics/working-with-schemas/index.html.gz b/gems/dry-schema/1.12/basics/working-with-schemas/index.html.gz index 262a7cc025..2a7b9f0711 100644 Binary files a/gems/dry-schema/1.12/basics/working-with-schemas/index.html.gz and b/gems/dry-schema/1.12/basics/working-with-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.12/error-messages/index.html b/gems/dry-schema/1.12/error-messages/index.html index e8abbf120a..f88fbce45b 100644 --- a/gems/dry-schema/1.12/error-messages/index.html +++ b/gems/dry-schema/1.12/error-messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Error messages

By default dry-schema comes with a set of pre-defined error messages for every built-in predicate. They are defined in a yaml file which is shipped with the gem. This file is compatible with I18n format.

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

# enable :hints
 
 Dry::Schema.load_extensions(:hints)
diff --git a/gems/dry-schema/1.12/extensions/hints/index.html.gz b/gems/dry-schema/1.12/extensions/hints/index.html.gz
index e332022058..f6e13dd875 100644
Binary files a/gems/dry-schema/1.12/extensions/hints/index.html.gz and b/gems/dry-schema/1.12/extensions/hints/index.html.gz differ
diff --git a/gems/dry-schema/1.12/extensions/index.html b/gems/dry-schema/1.12/extensions/index.html
index af1141958a..54edf6ea0e 100644
--- a/gems/dry-schema/1.12/extensions/index.html
+++ b/gems/dry-schema/1.12/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-schema can be extended with extension. Those extensions are loaded with Dry::Schema.load_extensions.

Available extensions:

diff --git a/gems/dry-schema/1.12/extensions/index.html.gz b/gems/dry-schema/1.12/extensions/index.html.gz index a030effb71..94591ca946 100644 Binary files a/gems/dry-schema/1.12/extensions/index.html.gz and b/gems/dry-schema/1.12/extensions/index.html.gz differ diff --git a/gems/dry-schema/1.12/extensions/info/index.html b/gems/dry-schema/1.12/extensions/info/index.html index e3170656a1..bbaa75e022 100644 --- a/gems/dry-schema/1.12/extensions/info/index.html +++ b/gems/dry-schema/1.12/extensions/info/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

+});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

WARN The info data structure is not stable yet and may change before 2.0.0 depending on the user feedback. diff --git a/gems/dry-schema/1.12/extensions/info/index.html.gz b/gems/dry-schema/1.12/extensions/info/index.html.gz index 935a26d6bb..213798f4d8 100644 Binary files a/gems/dry-schema/1.12/extensions/info/index.html.gz and b/gems/dry-schema/1.12/extensions/info/index.html.gz differ diff --git a/gems/dry-schema/1.12/extensions/json_schema/index.html b/gems/dry-schema/1.12/extensions/json_schema/index.html index 9917977922..51598a46ce 100644 --- a/gems/dry-schema/1.12/extensions/json_schema/index.html +++ b/gems/dry-schema/1.12/extensions/json_schema/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

JSON Schema

The :json_schema extension allows you to generate a valid JSON Schema from a Dry::Schema. JSON Schema is a widely used standard, so this unlocks many possibilities.

+});

JSON Schema

The :json_schema extension allows you to generate a valid JSON Schema from a Dry::Schema. JSON Schema is a widely used standard, so this unlocks many possibilities.

Dry::Schema.load_extensions(:json_schema)
 
 UserSchema = Dry::Schema.JSON do
diff --git a/gems/dry-schema/1.12/extensions/json_schema/index.html.gz b/gems/dry-schema/1.12/extensions/json_schema/index.html.gz
index 74b2368282..b3c08ac501 100644
Binary files a/gems/dry-schema/1.12/extensions/json_schema/index.html.gz and b/gems/dry-schema/1.12/extensions/json_schema/index.html.gz differ
diff --git a/gems/dry-schema/1.12/extensions/monads/index.html b/gems/dry-schema/1.12/extensions/monads/index.html
index 8c9bdd2b79..ecb7c97abe 100644
--- a/gems/dry-schema/1.12/extensions/monads/index.html
+++ b/gems/dry-schema/1.12/extensions/monads/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Monads

The monads extension makes Dry::Schema::Result objects compatible with dry-monads.

To enable the extension:

require 'dry/schema'
diff --git a/gems/dry-schema/1.12/extensions/monads/index.html.gz b/gems/dry-schema/1.12/extensions/monads/index.html.gz
index f663facda7..b691d17a9f 100644
Binary files a/gems/dry-schema/1.12/extensions/monads/index.html.gz and b/gems/dry-schema/1.12/extensions/monads/index.html.gz differ
diff --git a/gems/dry-schema/1.12/index.html b/gems/dry-schema/1.12/index.html
index f60ca43d7e..4d616d1b75 100644
--- a/gems/dry-schema/1.12/index.html
+++ b/gems/dry-schema/1.12/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

+});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

Main focus of this library is on:

diff --git a/gems/dry-schema/1.12/index.html.gz b/gems/dry-schema/1.12/index.html.gz index ae01745890..e948fea16c 100644 Binary files a/gems/dry-schema/1.12/index.html.gz and b/gems/dry-schema/1.12/index.html.gz differ diff --git a/gems/dry-schema/1.12/json/index.html b/gems/dry-schema/1.12/json/index.html index cb6580a5f0..e954972253 100644 --- a/gems/dry-schema/1.12/json/index.html +++ b/gems/dry-schema/1.12/json/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

JSON

To validate JSON data structures, you can use JSON schemas. The difference between Params and JSON is coercion logic. Refer to dry-types documentation for more information about supported JSON coercions.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

This also comes with the benefit of being explicit about the type expectation. In the example below we explicitly state that :age can be omitted or if present it must be an integer and it must be greater than 18.

Params

Probably the most common use case is to validate HTTP params. This is a special kind of a validation for a couple of reasons:

  • The input is a hash with stringified keys
  • diff --git a/gems/dry-schema/1.12/params/index.html.gz b/gems/dry-schema/1.12/params/index.html.gz index 8746879f49..75a1273fe0 100644 Binary files a/gems/dry-schema/1.12/params/index.html.gz and b/gems/dry-schema/1.12/params/index.html.gz differ diff --git a/gems/dry-schema/1.12/reusing-schemas/index.html b/gems/dry-schema/1.12/reusing-schemas/index.html index 13f149bfa9..fd6fe62720 100644 --- a/gems/dry-schema/1.12/reusing-schemas/index.html +++ b/gems/dry-schema/1.12/reusing-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Reusing schemas

You can easily reuse existing schemas using nested-schema syntax:

AddressSchema = Dry::Schema.Params do
   required(:street).filled(:string)
   required(:city).filled(:string)
diff --git a/gems/dry-schema/1.12/reusing-schemas/index.html.gz b/gems/dry-schema/1.12/reusing-schemas/index.html.gz
index 70e7a8db28..aa822b3ab6 100644
Binary files a/gems/dry-schema/1.12/reusing-schemas/index.html.gz and b/gems/dry-schema/1.12/reusing-schemas/index.html.gz differ
diff --git a/gems/dry-schema/1.13/advanced/composing-schemas/index.html b/gems/dry-schema/1.13/advanced/composing-schemas/index.html
index 88f487dcc9..4c610c65dc 100644
--- a/gems/dry-schema/1.13/advanced/composing-schemas/index.html
+++ b/gems/dry-schema/1.13/advanced/composing-schemas/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Composing schemas

+});

Composing schemas

Warning
diff --git a/gems/dry-schema/1.13/advanced/composing-schemas/index.html.gz b/gems/dry-schema/1.13/advanced/composing-schemas/index.html.gz index 2e648e2b18..8f80d7e93b 100644 Binary files a/gems/dry-schema/1.13/advanced/composing-schemas/index.html.gz and b/gems/dry-schema/1.13/advanced/composing-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.13/advanced/custom-predicates/index.html b/gems/dry-schema/1.13/advanced/custom-predicates/index.html index aaa93c5f9e..119c4876db 100644 --- a/gems/dry-schema/1.13/advanced/custom-predicates/index.html +++ b/gems/dry-schema/1.13/advanced/custom-predicates/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom predicates

If you want to define custom predicates, you can create a special module that includes default ones along with your custom functions:

+});

Custom predicates

If you want to define custom predicates, you can create a special module that includes default ones along with your custom functions:

module MyPredicates
   include Dry::Logic::Predicates
 
diff --git a/gems/dry-schema/1.13/advanced/custom-predicates/index.html.gz b/gems/dry-schema/1.13/advanced/custom-predicates/index.html.gz
index b568c83bb1..be2f0feaa0 100644
Binary files a/gems/dry-schema/1.13/advanced/custom-predicates/index.html.gz and b/gems/dry-schema/1.13/advanced/custom-predicates/index.html.gz differ
diff --git a/gems/dry-schema/1.13/advanced/custom-types/index.html b/gems/dry-schema/1.13/advanced/custom-types/index.html
index f103728aba..7d9446d4cd 100644
--- a/gems/dry-schema/1.13/advanced/custom-types/index.html
+++ b/gems/dry-schema/1.13/advanced/custom-types/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

+});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

StrippedString = Types::String.constructor(&:strip)
 
 Schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.13/advanced/custom-types/index.html.gz b/gems/dry-schema/1.13/advanced/custom-types/index.html.gz
index c6a3848136..376b7709f8 100644
Binary files a/gems/dry-schema/1.13/advanced/custom-types/index.html.gz and b/gems/dry-schema/1.13/advanced/custom-types/index.html.gz differ
diff --git a/gems/dry-schema/1.13/advanced/filtering/index.html b/gems/dry-schema/1.13/advanced/filtering/index.html
index 4b599aa0c9..f4b9c8ccef 100644
--- a/gems/dry-schema/1.13/advanced/filtering/index.html
+++ b/gems/dry-schema/1.13/advanced/filtering/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

+});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

Here's a common example - your system supports only one specific date format, and you want to validate that the input value has this format before trying to coerce it into a date object. In order to do that, you can use filter macro, which works just like value, but its predicates are applied before value coercion:

schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.13/advanced/filtering/index.html.gz b/gems/dry-schema/1.13/advanced/filtering/index.html.gz
index 425e5ecb50..bd1459cdb3 100644
Binary files a/gems/dry-schema/1.13/advanced/filtering/index.html.gz and b/gems/dry-schema/1.13/advanced/filtering/index.html.gz differ
diff --git a/gems/dry-schema/1.13/advanced/index.html b/gems/dry-schema/1.13/advanced/index.html
index df55b9deae..2d919aef21 100644
--- a/gems/dry-schema/1.13/advanced/index.html
+++ b/gems/dry-schema/1.13/advanced/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Advanced

  • Predicate Logic
  • Composing schemas
  • Unexpected keys
  • diff --git a/gems/dry-schema/1.13/advanced/index.html.gz b/gems/dry-schema/1.13/advanced/index.html.gz index 4a414408a0..317c0cedfb 100644 Binary files a/gems/dry-schema/1.13/advanced/index.html.gz and b/gems/dry-schema/1.13/advanced/index.html.gz differ diff --git a/gems/dry-schema/1.13/advanced/key-maps/index.html b/gems/dry-schema/1.13/advanced/key-maps/index.html index 4601475696..724f2ec280 100644 --- a/gems/dry-schema/1.13/advanced/key-maps/index.html +++ b/gems/dry-schema/1.13/advanced/key-maps/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

+});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

  • Rebuild the original input hash by rejecting unknown keys
  • diff --git a/gems/dry-schema/1.13/advanced/key-maps/index.html.gz b/gems/dry-schema/1.13/advanced/key-maps/index.html.gz index 859ab8342c..cb8ebc418c 100644 Binary files a/gems/dry-schema/1.13/advanced/key-maps/index.html.gz and b/gems/dry-schema/1.13/advanced/key-maps/index.html.gz differ diff --git a/gems/dry-schema/1.13/advanced/predicate-logic/index.html b/gems/dry-schema/1.13/advanced/predicate-logic/index.html index ae8614180c..4cbb9503d4 100644 --- a/gems/dry-schema/1.13/advanced/predicate-logic/index.html +++ b/gems/dry-schema/1.13/advanced/predicate-logic/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

+});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

This document explains how rule composition works in terms of predicate logic.

Processor steps

+});

Processor steps

Warning
diff --git a/gems/dry-schema/1.13/advanced/processor-steps/index.html.gz b/gems/dry-schema/1.13/advanced/processor-steps/index.html.gz index 4dfef80ebd..023d77fe94 100644 Binary files a/gems/dry-schema/1.13/advanced/processor-steps/index.html.gz and b/gems/dry-schema/1.13/advanced/processor-steps/index.html.gz differ diff --git a/gems/dry-schema/1.13/advanced/rule-ast/index.html b/gems/dry-schema/1.13/advanced/rule-ast/index.html index 754ad4ad3e..ed9dd822a0 100644 --- a/gems/dry-schema/1.13/advanced/rule-ast/index.html +++ b/gems/dry-schema/1.13/advanced/rule-ast/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Rule AST

The DSL in dry-schema is used to create rule objects that are provided by dry-logic. These rules are built using an AST, which uses simple data structures to represent predicates and how they are composed into complex rules and operations.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

In order to use this type of validation, you need to enable it via config:

# Enable it globally
diff --git a/gems/dry-schema/1.13/advanced/unexpected-keys/index.html.gz b/gems/dry-schema/1.13/advanced/unexpected-keys/index.html.gz
index 93c1b2db21..a6c7c19c37 100644
Binary files a/gems/dry-schema/1.13/advanced/unexpected-keys/index.html.gz and b/gems/dry-schema/1.13/advanced/unexpected-keys/index.html.gz differ
diff --git a/gems/dry-schema/1.13/basics/built-in-predicates/index.html b/gems/dry-schema/1.13/basics/built-in-predicates/index.html
index 4ebdd9a007..7bdebf8c8b 100644
--- a/gems/dry-schema/1.13/basics/built-in-predicates/index.html
+++ b/gems/dry-schema/1.13/basics/built-in-predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in predicates

The DSL supports many built-in predicates that can be used to verify validity of the input. If the predicates do not meet your requirements, you probably want to look at dry-validation which offers a more advanced way of defining validations.

+});

Basics

Here's a basic example where we validate the following things:

  • The input must have a key called :email diff --git a/gems/dry-schema/1.13/basics/index.html.gz b/gems/dry-schema/1.13/basics/index.html.gz index 48d6468502..fe668e47ef 100644 Binary files a/gems/dry-schema/1.13/basics/index.html.gz and b/gems/dry-schema/1.13/basics/index.html.gz differ diff --git a/gems/dry-schema/1.13/basics/macros/index.html b/gems/dry-schema/1.13/basics/macros/index.html index ef4e849a2f..8aa7b95e70 100644 --- a/gems/dry-schema/1.13/basics/macros/index.html +++ b/gems/dry-schema/1.13/basics/macros/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Macros

Defining rules using blocks is very flexible and powerful; however, in most common cases repeatedly defining the same rules leads to boilerplate code. That's why dry-schema's DSL provides convenient macros to reduce that boilerplate. Every macro can be expanded to its block-based equivalent.

+});

Type specs

+});

Type specs

Warning
diff --git a/gems/dry-schema/1.13/basics/type-specs/index.html.gz b/gems/dry-schema/1.13/basics/type-specs/index.html.gz index 1378ed32a2..be6a84860f 100644 Binary files a/gems/dry-schema/1.13/basics/type-specs/index.html.gz and b/gems/dry-schema/1.13/basics/type-specs/index.html.gz differ diff --git a/gems/dry-schema/1.13/basics/working-with-schemas/index.html b/gems/dry-schema/1.13/basics/working-with-schemas/index.html index 0eb8c9e6b8..fcc0d48291 100644 --- a/gems/dry-schema/1.13/basics/working-with-schemas/index.html +++ b/gems/dry-schema/1.13/basics/working-with-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

+});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

Schema definition best practices:

diff --git a/gems/dry-schema/1.13/basics/working-with-schemas/index.html.gz b/gems/dry-schema/1.13/basics/working-with-schemas/index.html.gz index 5fee77dbad..968881cbea 100644 Binary files a/gems/dry-schema/1.13/basics/working-with-schemas/index.html.gz and b/gems/dry-schema/1.13/basics/working-with-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.13/error-messages/index.html b/gems/dry-schema/1.13/error-messages/index.html index 0c1a728332..7171f882dc 100644 --- a/gems/dry-schema/1.13/error-messages/index.html +++ b/gems/dry-schema/1.13/error-messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Error messages

By default dry-schema comes with a set of pre-defined error messages for every built-in predicate. They are defined in a yaml file which is shipped with the gem. This file is compatible with I18n format.

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

# enable :hints
 
 Dry::Schema.load_extensions(:hints)
diff --git a/gems/dry-schema/1.13/extensions/hints/index.html.gz b/gems/dry-schema/1.13/extensions/hints/index.html.gz
index 19d6823e8c..aed0a74e6b 100644
Binary files a/gems/dry-schema/1.13/extensions/hints/index.html.gz and b/gems/dry-schema/1.13/extensions/hints/index.html.gz differ
diff --git a/gems/dry-schema/1.13/extensions/index.html b/gems/dry-schema/1.13/extensions/index.html
index 9ef231b1a6..0d1bb99c95 100644
--- a/gems/dry-schema/1.13/extensions/index.html
+++ b/gems/dry-schema/1.13/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-schema can be extended with extension. Those extensions are loaded with Dry::Schema.load_extensions.

Available extensions:

diff --git a/gems/dry-schema/1.13/extensions/index.html.gz b/gems/dry-schema/1.13/extensions/index.html.gz index 06fbf20b27..872408b5c6 100644 Binary files a/gems/dry-schema/1.13/extensions/index.html.gz and b/gems/dry-schema/1.13/extensions/index.html.gz differ diff --git a/gems/dry-schema/1.13/extensions/info/index.html b/gems/dry-schema/1.13/extensions/info/index.html index 85f7a5e9bd..3e8c897243 100644 --- a/gems/dry-schema/1.13/extensions/info/index.html +++ b/gems/dry-schema/1.13/extensions/info/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

+});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

WARN The info data structure is not stable yet and may change before 2.0.0 depending on the user feedback. diff --git a/gems/dry-schema/1.13/extensions/info/index.html.gz b/gems/dry-schema/1.13/extensions/info/index.html.gz index 0cfedacfa5..caed1ee07f 100644 Binary files a/gems/dry-schema/1.13/extensions/info/index.html.gz and b/gems/dry-schema/1.13/extensions/info/index.html.gz differ diff --git a/gems/dry-schema/1.13/extensions/json_schema/index.html b/gems/dry-schema/1.13/extensions/json_schema/index.html index 741122abb6..a476432d7c 100644 --- a/gems/dry-schema/1.13/extensions/json_schema/index.html +++ b/gems/dry-schema/1.13/extensions/json_schema/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

JSON Schema

The :json_schema extension allows you to generate a valid JSON Schema from a Dry::Schema. JSON Schema is a widely used standard, so this unlocks many possibilities.

+});

JSON Schema

The :json_schema extension allows you to generate a valid JSON Schema from a Dry::Schema. JSON Schema is a widely used standard, so this unlocks many possibilities.

Dry::Schema.load_extensions(:json_schema)
 
 UserSchema = Dry::Schema.JSON do
diff --git a/gems/dry-schema/1.13/extensions/json_schema/index.html.gz b/gems/dry-schema/1.13/extensions/json_schema/index.html.gz
index 7c01d134c5..8515e0f783 100644
Binary files a/gems/dry-schema/1.13/extensions/json_schema/index.html.gz and b/gems/dry-schema/1.13/extensions/json_schema/index.html.gz differ
diff --git a/gems/dry-schema/1.13/extensions/monads/index.html b/gems/dry-schema/1.13/extensions/monads/index.html
index 10cb428d95..309ca5f8b8 100644
--- a/gems/dry-schema/1.13/extensions/monads/index.html
+++ b/gems/dry-schema/1.13/extensions/monads/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Monads

The monads extension makes Dry::Schema::Result objects compatible with dry-monads.

To enable the extension:

require 'dry/schema'
diff --git a/gems/dry-schema/1.13/extensions/monads/index.html.gz b/gems/dry-schema/1.13/extensions/monads/index.html.gz
index 0a5662223a..82ea5287e7 100644
Binary files a/gems/dry-schema/1.13/extensions/monads/index.html.gz and b/gems/dry-schema/1.13/extensions/monads/index.html.gz differ
diff --git a/gems/dry-schema/1.13/index.html b/gems/dry-schema/1.13/index.html
index 5a053d2064..abe02dac39 100644
--- a/gems/dry-schema/1.13/index.html
+++ b/gems/dry-schema/1.13/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

+});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

Main focus of this library is on:

diff --git a/gems/dry-schema/1.13/index.html.gz b/gems/dry-schema/1.13/index.html.gz index 4411b684a5..71755da274 100644 Binary files a/gems/dry-schema/1.13/index.html.gz and b/gems/dry-schema/1.13/index.html.gz differ diff --git a/gems/dry-schema/1.13/json/index.html b/gems/dry-schema/1.13/json/index.html index cbc5631e27..d4f063e917 100644 --- a/gems/dry-schema/1.13/json/index.html +++ b/gems/dry-schema/1.13/json/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

JSON

To validate JSON data structures, you can use JSON schemas. The difference between Params and JSON is coercion logic. Refer to dry-types documentation for more information about supported JSON coercions.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

This also comes with the benefit of being explicit about the type expectation. In the example below we explicitly state that :age can be omitted or if present it must be an integer and it must be greater than 18.

Params

Probably the most common use case is to validate HTTP params. This is a special kind of a validation for a couple of reasons:

  • The input is a hash with stringified keys
  • diff --git a/gems/dry-schema/1.13/params/index.html.gz b/gems/dry-schema/1.13/params/index.html.gz index 356b365801..61b04c83a7 100644 Binary files a/gems/dry-schema/1.13/params/index.html.gz and b/gems/dry-schema/1.13/params/index.html.gz differ diff --git a/gems/dry-schema/1.13/reusing-schemas/index.html b/gems/dry-schema/1.13/reusing-schemas/index.html index fb27ebf264..d1af045027 100644 --- a/gems/dry-schema/1.13/reusing-schemas/index.html +++ b/gems/dry-schema/1.13/reusing-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Reusing schemas

You can easily reuse existing schemas using nested-schema syntax:

AddressSchema = Dry::Schema.Params do
   required(:street).filled(:string)
   required(:city).filled(:string)
diff --git a/gems/dry-schema/1.13/reusing-schemas/index.html.gz b/gems/dry-schema/1.13/reusing-schemas/index.html.gz
index 289bba37ec..b7960c7ec8 100644
Binary files a/gems/dry-schema/1.13/reusing-schemas/index.html.gz and b/gems/dry-schema/1.13/reusing-schemas/index.html.gz differ
diff --git a/gems/dry-schema/1.4/advanced/custom-types/index.html b/gems/dry-schema/1.4/advanced/custom-types/index.html
index f2079363ca..306aeb996f 100644
--- a/gems/dry-schema/1.4/advanced/custom-types/index.html
+++ b/gems/dry-schema/1.4/advanced/custom-types/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

+});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

StrippedString = Types::String.constructor(&:strip)
 
 Schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.4/advanced/custom-types/index.html.gz b/gems/dry-schema/1.4/advanced/custom-types/index.html.gz
index b4740829a3..501b88b12e 100644
Binary files a/gems/dry-schema/1.4/advanced/custom-types/index.html.gz and b/gems/dry-schema/1.4/advanced/custom-types/index.html.gz differ
diff --git a/gems/dry-schema/1.4/advanced/filtering/index.html b/gems/dry-schema/1.4/advanced/filtering/index.html
index 3dc644c48c..b6b6f0bb87 100644
--- a/gems/dry-schema/1.4/advanced/filtering/index.html
+++ b/gems/dry-schema/1.4/advanced/filtering/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

+});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

Here's a common example - your system supports only one specific date format, and you want to validate that the input value has this format before trying to coerce it into a date object. In order to do that, you can use filter macro, which works just like value, but its predicates are applied before value coercion:

schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.4/advanced/filtering/index.html.gz b/gems/dry-schema/1.4/advanced/filtering/index.html.gz
index 8a4d97052f..2ddbf9423d 100644
Binary files a/gems/dry-schema/1.4/advanced/filtering/index.html.gz and b/gems/dry-schema/1.4/advanced/filtering/index.html.gz differ
diff --git a/gems/dry-schema/1.4/advanced/index.html b/gems/dry-schema/1.4/advanced/index.html
index 0b1733e20d..8f293a5344 100644
--- a/gems/dry-schema/1.4/advanced/index.html
+++ b/gems/dry-schema/1.4/advanced/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Advanced

  • Predicate Logic
  • Filtering
  • Key maps
  • diff --git a/gems/dry-schema/1.4/advanced/index.html.gz b/gems/dry-schema/1.4/advanced/index.html.gz index 60fce2b8a8..035cdc4adf 100644 Binary files a/gems/dry-schema/1.4/advanced/index.html.gz and b/gems/dry-schema/1.4/advanced/index.html.gz differ diff --git a/gems/dry-schema/1.4/advanced/key-maps/index.html b/gems/dry-schema/1.4/advanced/key-maps/index.html index cd90e0a0fc..e36d792ece 100644 --- a/gems/dry-schema/1.4/advanced/key-maps/index.html +++ b/gems/dry-schema/1.4/advanced/key-maps/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

+});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

  • Rebuild the original input hash by rejecting unknown keys
  • diff --git a/gems/dry-schema/1.4/advanced/key-maps/index.html.gz b/gems/dry-schema/1.4/advanced/key-maps/index.html.gz index 4af4e231ba..764bd41367 100644 Binary files a/gems/dry-schema/1.4/advanced/key-maps/index.html.gz and b/gems/dry-schema/1.4/advanced/key-maps/index.html.gz differ diff --git a/gems/dry-schema/1.4/advanced/predicate-logic/index.html b/gems/dry-schema/1.4/advanced/predicate-logic/index.html index 97058ca2b3..91e1d5fe21 100644 --- a/gems/dry-schema/1.4/advanced/predicate-logic/index.html +++ b/gems/dry-schema/1.4/advanced/predicate-logic/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

+});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

This document explains how rule composition works in terms of predicate logic.

Processor steps

+});

Processor steps

Warning
diff --git a/gems/dry-schema/1.4/advanced/processor-steps/index.html.gz b/gems/dry-schema/1.4/advanced/processor-steps/index.html.gz index 8d338d0f8d..03898c08a3 100644 Binary files a/gems/dry-schema/1.4/advanced/processor-steps/index.html.gz and b/gems/dry-schema/1.4/advanced/processor-steps/index.html.gz differ diff --git a/gems/dry-schema/1.4/advanced/rule-ast/index.html b/gems/dry-schema/1.4/advanced/rule-ast/index.html index 355a487ea1..b789b5f9e7 100644 --- a/gems/dry-schema/1.4/advanced/rule-ast/index.html +++ b/gems/dry-schema/1.4/advanced/rule-ast/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Rule AST

The DSL in dry-schema is used to create rule objects that are provided by dry-logic. These rules are built using an AST, which uses simple data structures to represent predicates and how they are composed into complex rules and operations.

+});

Built-in predicates

The DSL supports many built-in predicates that can be used to verify validity of the input. If the predicates do not meet your requirements, you probably want to look at dry-validation which offers a more advanced way of defining validations.

+});

Basics

Here's a basic example where we validate the following things:

  • The input must have a key called :email diff --git a/gems/dry-schema/1.4/basics/index.html.gz b/gems/dry-schema/1.4/basics/index.html.gz index c8d459bb72..91a719cb31 100644 Binary files a/gems/dry-schema/1.4/basics/index.html.gz and b/gems/dry-schema/1.4/basics/index.html.gz differ diff --git a/gems/dry-schema/1.4/basics/macros/index.html b/gems/dry-schema/1.4/basics/macros/index.html index 1261d2d9ce..bae4cb5183 100644 --- a/gems/dry-schema/1.4/basics/macros/index.html +++ b/gems/dry-schema/1.4/basics/macros/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Macros

Defining rules using blocks is very flexible and powerful; however, in most common cases repeatedly defining the same rules leads to boilerplate code. That's why dry-schema's DSL provides convenient macros to reduce that boilerplate. Every macro can be expanded to its block-based equivalent.

+});

Type specs

+});

Type specs

Warning
diff --git a/gems/dry-schema/1.4/basics/type-specs/index.html.gz b/gems/dry-schema/1.4/basics/type-specs/index.html.gz index 5591b625f3..ac34a87e8c 100644 Binary files a/gems/dry-schema/1.4/basics/type-specs/index.html.gz and b/gems/dry-schema/1.4/basics/type-specs/index.html.gz differ diff --git a/gems/dry-schema/1.4/basics/working-with-schemas/index.html b/gems/dry-schema/1.4/basics/working-with-schemas/index.html index a06b8366d5..9f42a18c67 100644 --- a/gems/dry-schema/1.4/basics/working-with-schemas/index.html +++ b/gems/dry-schema/1.4/basics/working-with-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

+});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

Schema definition best practices:

diff --git a/gems/dry-schema/1.4/basics/working-with-schemas/index.html.gz b/gems/dry-schema/1.4/basics/working-with-schemas/index.html.gz index 03b28193bd..a8b078b284 100644 Binary files a/gems/dry-schema/1.4/basics/working-with-schemas/index.html.gz and b/gems/dry-schema/1.4/basics/working-with-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.4/error-messages/index.html b/gems/dry-schema/1.4/error-messages/index.html index 5b045bfabb..fbccfab26d 100644 --- a/gems/dry-schema/1.4/error-messages/index.html +++ b/gems/dry-schema/1.4/error-messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Error messages

By default dry-schema comes with a set of pre-defined error messages for every built-in predicate. They are defined in a yaml file which is shipped with the gem. This file is compatible with I18n format.

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

# enable :hints
 
 Dry::Schema.load_extensions(:hints)
diff --git a/gems/dry-schema/1.4/extensions/hints/index.html.gz b/gems/dry-schema/1.4/extensions/hints/index.html.gz
index 31cc691a0c..0aa82534dc 100644
Binary files a/gems/dry-schema/1.4/extensions/hints/index.html.gz and b/gems/dry-schema/1.4/extensions/hints/index.html.gz differ
diff --git a/gems/dry-schema/1.4/extensions/index.html b/gems/dry-schema/1.4/extensions/index.html
index 2ba379f605..9c84b969e3 100644
--- a/gems/dry-schema/1.4/extensions/index.html
+++ b/gems/dry-schema/1.4/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-schema can be extended with extension. Those extensions are loaded with Dry::Schema.load_extensions.

+});

Extensions

dry-schema can be extended with extension. Those extensions are loaded with Dry::Schema.load_extensions.

Available extensions:

diff --git a/gems/dry-schema/1.4/extensions/index.html.gz b/gems/dry-schema/1.4/extensions/index.html.gz index 870dbc6408..42ce55ed62 100644 Binary files a/gems/dry-schema/1.4/extensions/index.html.gz and b/gems/dry-schema/1.4/extensions/index.html.gz differ diff --git a/gems/dry-schema/1.4/extensions/monads/index.html b/gems/dry-schema/1.4/extensions/monads/index.html index 780dd72010..3683d363dc 100644 --- a/gems/dry-schema/1.4/extensions/monads/index.html +++ b/gems/dry-schema/1.4/extensions/monads/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Monads

The monads extension makes Dry::Schema::Result objects compatible with dry-monads.

To enable the extension:

require 'dry/schema'
diff --git a/gems/dry-schema/1.4/extensions/monads/index.html.gz b/gems/dry-schema/1.4/extensions/monads/index.html.gz
index 3622860a51..1308461302 100644
Binary files a/gems/dry-schema/1.4/extensions/monads/index.html.gz and b/gems/dry-schema/1.4/extensions/monads/index.html.gz differ
diff --git a/gems/dry-schema/1.4/index.html b/gems/dry-schema/1.4/index.html
index 728ec1197f..8eb9bb069f 100644
--- a/gems/dry-schema/1.4/index.html
+++ b/gems/dry-schema/1.4/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

+});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

Main focus of this library is on:

diff --git a/gems/dry-schema/1.4/index.html.gz b/gems/dry-schema/1.4/index.html.gz index d6d1187c08..c34c0c303a 100644 Binary files a/gems/dry-schema/1.4/index.html.gz and b/gems/dry-schema/1.4/index.html.gz differ diff --git a/gems/dry-schema/1.4/json/index.html b/gems/dry-schema/1.4/json/index.html index 2c802aef94..cef7b6495b 100644 --- a/gems/dry-schema/1.4/json/index.html +++ b/gems/dry-schema/1.4/json/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

JSON

To validate JSON data structures, you can use JSON schemas. The difference between Params and JSON is coercion logic. Refer to dry-types documentation for more information about supported JSON coercions.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

+});

Params

Probably the most common use case is to validate HTTP params. This is a special kind of a validation for a couple of reasons:

+});

Params

Probably the most common use case is to validate HTTP params. This is a special kind of a validation for a couple of reasons:

  • The input is a hash with stringified keys
  • diff --git a/gems/dry-schema/1.4/params/index.html.gz b/gems/dry-schema/1.4/params/index.html.gz index 709f0162cd..0b29aa8bb5 100644 Binary files a/gems/dry-schema/1.4/params/index.html.gz and b/gems/dry-schema/1.4/params/index.html.gz differ diff --git a/gems/dry-schema/1.4/reusing-schemas/index.html b/gems/dry-schema/1.4/reusing-schemas/index.html index 6df26bcc8b..c0f7e70324 100644 --- a/gems/dry-schema/1.4/reusing-schemas/index.html +++ b/gems/dry-schema/1.4/reusing-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Reusing schemas

You can easily reuse existing schemas using nested-schema syntax:

AddressSchema = Dry::Schema.Params do
   required(:street).filled(:string)
   required(:city).filled(:string)
diff --git a/gems/dry-schema/1.4/reusing-schemas/index.html.gz b/gems/dry-schema/1.4/reusing-schemas/index.html.gz
index 7b82e51ee5..0039aa85e8 100644
Binary files a/gems/dry-schema/1.4/reusing-schemas/index.html.gz and b/gems/dry-schema/1.4/reusing-schemas/index.html.gz differ
diff --git a/gems/dry-schema/1.5/advanced/composing-schemas/index.html b/gems/dry-schema/1.5/advanced/composing-schemas/index.html
index d1f49acf76..fa4c965dfd 100644
--- a/gems/dry-schema/1.5/advanced/composing-schemas/index.html
+++ b/gems/dry-schema/1.5/advanced/composing-schemas/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Composing schemas

+});

Composing schemas

Warning
diff --git a/gems/dry-schema/1.5/advanced/composing-schemas/index.html.gz b/gems/dry-schema/1.5/advanced/composing-schemas/index.html.gz index 060fab6b87..6ef255d37c 100644 Binary files a/gems/dry-schema/1.5/advanced/composing-schemas/index.html.gz and b/gems/dry-schema/1.5/advanced/composing-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.5/advanced/custom-types/index.html b/gems/dry-schema/1.5/advanced/custom-types/index.html index e60070f558..54164f45db 100644 --- a/gems/dry-schema/1.5/advanced/custom-types/index.html +++ b/gems/dry-schema/1.5/advanced/custom-types/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

+});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

StrippedString = Types::String.constructor(&:strip)
 
 Schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.5/advanced/custom-types/index.html.gz b/gems/dry-schema/1.5/advanced/custom-types/index.html.gz
index 699e3121b9..a4be8c02aa 100644
Binary files a/gems/dry-schema/1.5/advanced/custom-types/index.html.gz and b/gems/dry-schema/1.5/advanced/custom-types/index.html.gz differ
diff --git a/gems/dry-schema/1.5/advanced/filtering/index.html b/gems/dry-schema/1.5/advanced/filtering/index.html
index f6f8f008a9..b46c34c658 100644
--- a/gems/dry-schema/1.5/advanced/filtering/index.html
+++ b/gems/dry-schema/1.5/advanced/filtering/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

+});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

Here's a common example - your system supports only one specific date format, and you want to validate that the input value has this format before trying to coerce it into a date object. In order to do that, you can use filter macro, which works just like value, but its predicates are applied before value coercion:

schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.5/advanced/filtering/index.html.gz b/gems/dry-schema/1.5/advanced/filtering/index.html.gz
index 0fc2467253..33dcf1070a 100644
Binary files a/gems/dry-schema/1.5/advanced/filtering/index.html.gz and b/gems/dry-schema/1.5/advanced/filtering/index.html.gz differ
diff --git a/gems/dry-schema/1.5/advanced/index.html b/gems/dry-schema/1.5/advanced/index.html
index ef7db062f4..d4eec38664 100644
--- a/gems/dry-schema/1.5/advanced/index.html
+++ b/gems/dry-schema/1.5/advanced/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Advanced

  • Predicate Logic
  • Composing schemas
  • Unexpected keys
  • diff --git a/gems/dry-schema/1.5/advanced/index.html.gz b/gems/dry-schema/1.5/advanced/index.html.gz index bfa3a35275..d19b5751bf 100644 Binary files a/gems/dry-schema/1.5/advanced/index.html.gz and b/gems/dry-schema/1.5/advanced/index.html.gz differ diff --git a/gems/dry-schema/1.5/advanced/key-maps/index.html b/gems/dry-schema/1.5/advanced/key-maps/index.html index 7066ef7f0b..b19299204e 100644 --- a/gems/dry-schema/1.5/advanced/key-maps/index.html +++ b/gems/dry-schema/1.5/advanced/key-maps/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

+});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

  • Rebuild the original input hash by rejecting unknown keys
  • diff --git a/gems/dry-schema/1.5/advanced/key-maps/index.html.gz b/gems/dry-schema/1.5/advanced/key-maps/index.html.gz index 349ff21876..f95b2c1b25 100644 Binary files a/gems/dry-schema/1.5/advanced/key-maps/index.html.gz and b/gems/dry-schema/1.5/advanced/key-maps/index.html.gz differ diff --git a/gems/dry-schema/1.5/advanced/predicate-logic/index.html b/gems/dry-schema/1.5/advanced/predicate-logic/index.html index 02d0539ce5..155d23c7d5 100644 --- a/gems/dry-schema/1.5/advanced/predicate-logic/index.html +++ b/gems/dry-schema/1.5/advanced/predicate-logic/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

+});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

This document explains how rule composition works in terms of predicate logic.

Processor steps

+});

Processor steps

Warning
diff --git a/gems/dry-schema/1.5/advanced/processor-steps/index.html.gz b/gems/dry-schema/1.5/advanced/processor-steps/index.html.gz index 9bd2d68d96..5260364a81 100644 Binary files a/gems/dry-schema/1.5/advanced/processor-steps/index.html.gz and b/gems/dry-schema/1.5/advanced/processor-steps/index.html.gz differ diff --git a/gems/dry-schema/1.5/advanced/rule-ast/index.html b/gems/dry-schema/1.5/advanced/rule-ast/index.html index cfcd8b2b59..1150ca4938 100644 --- a/gems/dry-schema/1.5/advanced/rule-ast/index.html +++ b/gems/dry-schema/1.5/advanced/rule-ast/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Rule AST

The DSL in dry-schema is used to create rule objects that are provided by dry-logic. These rules are built using an AST, which uses simple data structures to represent predicates and how they are composed into complex rules and operations.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

In order to use this type of validation, you need to enable it via config:

# Enable it globally
diff --git a/gems/dry-schema/1.5/advanced/unexpected-keys/index.html.gz b/gems/dry-schema/1.5/advanced/unexpected-keys/index.html.gz
index 1862fa9a58..9a47a92ee4 100644
Binary files a/gems/dry-schema/1.5/advanced/unexpected-keys/index.html.gz and b/gems/dry-schema/1.5/advanced/unexpected-keys/index.html.gz differ
diff --git a/gems/dry-schema/1.5/basics/built-in-predicates/index.html b/gems/dry-schema/1.5/basics/built-in-predicates/index.html
index 6dabecaa1a..e471528ad6 100644
--- a/gems/dry-schema/1.5/basics/built-in-predicates/index.html
+++ b/gems/dry-schema/1.5/basics/built-in-predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in predicates

The DSL supports many built-in predicates that can be used to verify validity of the input. If the predicates do not meet your requirements, you probably want to look at dry-validation which offers a more advanced way of defining validations.

+});

Basics

Here's a basic example where we validate the following things:

  • The input must have a key called :email diff --git a/gems/dry-schema/1.5/basics/index.html.gz b/gems/dry-schema/1.5/basics/index.html.gz index 2688c946f7..71f3e6c1e3 100644 Binary files a/gems/dry-schema/1.5/basics/index.html.gz and b/gems/dry-schema/1.5/basics/index.html.gz differ diff --git a/gems/dry-schema/1.5/basics/macros/index.html b/gems/dry-schema/1.5/basics/macros/index.html index ef44eaedc9..c2141ab49b 100644 --- a/gems/dry-schema/1.5/basics/macros/index.html +++ b/gems/dry-schema/1.5/basics/macros/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Macros

Defining rules using blocks is very flexible and powerful; however, in most common cases repeatedly defining the same rules leads to boilerplate code. That's why dry-schema's DSL provides convenient macros to reduce that boilerplate. Every macro can be expanded to its block-based equivalent.

+});

Type specs

+});

Type specs

Warning
diff --git a/gems/dry-schema/1.5/basics/type-specs/index.html.gz b/gems/dry-schema/1.5/basics/type-specs/index.html.gz index af51f41c8a..3a8c346fa7 100644 Binary files a/gems/dry-schema/1.5/basics/type-specs/index.html.gz and b/gems/dry-schema/1.5/basics/type-specs/index.html.gz differ diff --git a/gems/dry-schema/1.5/basics/working-with-schemas/index.html b/gems/dry-schema/1.5/basics/working-with-schemas/index.html index be3f31e27c..3871e03e47 100644 --- a/gems/dry-schema/1.5/basics/working-with-schemas/index.html +++ b/gems/dry-schema/1.5/basics/working-with-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

+});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

Schema definition best practices:

diff --git a/gems/dry-schema/1.5/basics/working-with-schemas/index.html.gz b/gems/dry-schema/1.5/basics/working-with-schemas/index.html.gz index ba0f29bb93..8cd88bc2fd 100644 Binary files a/gems/dry-schema/1.5/basics/working-with-schemas/index.html.gz and b/gems/dry-schema/1.5/basics/working-with-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.5/error-messages/index.html b/gems/dry-schema/1.5/error-messages/index.html index 7c6ad70745..4d6a4e961a 100644 --- a/gems/dry-schema/1.5/error-messages/index.html +++ b/gems/dry-schema/1.5/error-messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Error messages

By default dry-schema comes with a set of pre-defined error messages for every built-in predicate. They are defined in a yaml file which is shipped with the gem. This file is compatible with I18n format.

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

# enable :hints
 
 Dry::Schema.load_extensions(:hints)
diff --git a/gems/dry-schema/1.5/extensions/hints/index.html.gz b/gems/dry-schema/1.5/extensions/hints/index.html.gz
index 41bea16527..dfe47abeb7 100644
Binary files a/gems/dry-schema/1.5/extensions/hints/index.html.gz and b/gems/dry-schema/1.5/extensions/hints/index.html.gz differ
diff --git a/gems/dry-schema/1.5/extensions/index.html b/gems/dry-schema/1.5/extensions/index.html
index 4a2604795d..9f9fe6a3f1 100644
--- a/gems/dry-schema/1.5/extensions/index.html
+++ b/gems/dry-schema/1.5/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-schema can be extended with extension. Those extensions are loaded with Dry::Schema.load_extensions.

Available extensions:

diff --git a/gems/dry-schema/1.5/extensions/index.html.gz b/gems/dry-schema/1.5/extensions/index.html.gz index 9dd3a243b9..28d6d89408 100644 Binary files a/gems/dry-schema/1.5/extensions/index.html.gz and b/gems/dry-schema/1.5/extensions/index.html.gz differ diff --git a/gems/dry-schema/1.5/extensions/info/index.html b/gems/dry-schema/1.5/extensions/info/index.html index 882359ac7f..e690666a54 100644 --- a/gems/dry-schema/1.5/extensions/info/index.html +++ b/gems/dry-schema/1.5/extensions/info/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

+});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

WARN The info data structure is not stable yet and may change before 2.0.0 depending on the user feedback. diff --git a/gems/dry-schema/1.5/extensions/info/index.html.gz b/gems/dry-schema/1.5/extensions/info/index.html.gz index 6ec8d60b29..5ca715aead 100644 Binary files a/gems/dry-schema/1.5/extensions/info/index.html.gz and b/gems/dry-schema/1.5/extensions/info/index.html.gz differ diff --git a/gems/dry-schema/1.5/extensions/monads/index.html b/gems/dry-schema/1.5/extensions/monads/index.html index ce1bb1733d..260b2a7c49 100644 --- a/gems/dry-schema/1.5/extensions/monads/index.html +++ b/gems/dry-schema/1.5/extensions/monads/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Monads

The monads extension makes Dry::Schema::Result objects compatible with dry-monads.

To enable the extension:

require 'dry/schema'
diff --git a/gems/dry-schema/1.5/extensions/monads/index.html.gz b/gems/dry-schema/1.5/extensions/monads/index.html.gz
index 159ab5afde..03eb801627 100644
Binary files a/gems/dry-schema/1.5/extensions/monads/index.html.gz and b/gems/dry-schema/1.5/extensions/monads/index.html.gz differ
diff --git a/gems/dry-schema/1.5/index.html b/gems/dry-schema/1.5/index.html
index 105a9571e5..e613ae2fd4 100644
--- a/gems/dry-schema/1.5/index.html
+++ b/gems/dry-schema/1.5/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

+});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

Main focus of this library is on:

diff --git a/gems/dry-schema/1.5/index.html.gz b/gems/dry-schema/1.5/index.html.gz index e4fe9d8629..ca4c1dcdc3 100644 Binary files a/gems/dry-schema/1.5/index.html.gz and b/gems/dry-schema/1.5/index.html.gz differ diff --git a/gems/dry-schema/1.5/json/index.html b/gems/dry-schema/1.5/json/index.html index ce931abc2d..7ae799fcfe 100644 --- a/gems/dry-schema/1.5/json/index.html +++ b/gems/dry-schema/1.5/json/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

JSON

To validate JSON data structures, you can use JSON schemas. The difference between Params and JSON is coercion logic. Refer to dry-types documentation for more information about supported JSON coercions.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

This also comes with the benefit of being explicit about the type expectation. In the example below we explicitly state that :age can be omitted or if present it must be an integer and it must be greater than 18.

Params

Probably the most common use case is to validate HTTP params. This is a special kind of a validation for a couple of reasons:

  • The input is a hash with stringified keys
  • diff --git a/gems/dry-schema/1.5/params/index.html.gz b/gems/dry-schema/1.5/params/index.html.gz index 560eb16f49..7e13799f5d 100644 Binary files a/gems/dry-schema/1.5/params/index.html.gz and b/gems/dry-schema/1.5/params/index.html.gz differ diff --git a/gems/dry-schema/1.5/reusing-schemas/index.html b/gems/dry-schema/1.5/reusing-schemas/index.html index 6f13f8183c..a9318b4b54 100644 --- a/gems/dry-schema/1.5/reusing-schemas/index.html +++ b/gems/dry-schema/1.5/reusing-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Reusing schemas

You can easily reuse existing schemas using nested-schema syntax:

AddressSchema = Dry::Schema.Params do
   required(:street).filled(:string)
   required(:city).filled(:string)
diff --git a/gems/dry-schema/1.5/reusing-schemas/index.html.gz b/gems/dry-schema/1.5/reusing-schemas/index.html.gz
index cfcacb045c..461b265466 100644
Binary files a/gems/dry-schema/1.5/reusing-schemas/index.html.gz and b/gems/dry-schema/1.5/reusing-schemas/index.html.gz differ
diff --git a/gems/dry-schema/1.6/advanced/composing-schemas/index.html b/gems/dry-schema/1.6/advanced/composing-schemas/index.html
index 803aa2f817..1961692f23 100644
--- a/gems/dry-schema/1.6/advanced/composing-schemas/index.html
+++ b/gems/dry-schema/1.6/advanced/composing-schemas/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Composing schemas

+});

Composing schemas

Warning
diff --git a/gems/dry-schema/1.6/advanced/composing-schemas/index.html.gz b/gems/dry-schema/1.6/advanced/composing-schemas/index.html.gz index eb55ef9812..73d84cdfb6 100644 Binary files a/gems/dry-schema/1.6/advanced/composing-schemas/index.html.gz and b/gems/dry-schema/1.6/advanced/composing-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.6/advanced/custom-types/index.html b/gems/dry-schema/1.6/advanced/custom-types/index.html index 487db5422d..fc76e7707c 100644 --- a/gems/dry-schema/1.6/advanced/custom-types/index.html +++ b/gems/dry-schema/1.6/advanced/custom-types/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

+});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

StrippedString = Types::String.constructor(&:strip)
 
 Schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.6/advanced/custom-types/index.html.gz b/gems/dry-schema/1.6/advanced/custom-types/index.html.gz
index 36e31e6956..f6c15e7b45 100644
Binary files a/gems/dry-schema/1.6/advanced/custom-types/index.html.gz and b/gems/dry-schema/1.6/advanced/custom-types/index.html.gz differ
diff --git a/gems/dry-schema/1.6/advanced/filtering/index.html b/gems/dry-schema/1.6/advanced/filtering/index.html
index 57a467ed89..c2e3b53f5c 100644
--- a/gems/dry-schema/1.6/advanced/filtering/index.html
+++ b/gems/dry-schema/1.6/advanced/filtering/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

+});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

Here's a common example - your system supports only one specific date format, and you want to validate that the input value has this format before trying to coerce it into a date object. In order to do that, you can use filter macro, which works just like value, but its predicates are applied before value coercion:

schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.6/advanced/filtering/index.html.gz b/gems/dry-schema/1.6/advanced/filtering/index.html.gz
index 0c04003c19..db85af951e 100644
Binary files a/gems/dry-schema/1.6/advanced/filtering/index.html.gz and b/gems/dry-schema/1.6/advanced/filtering/index.html.gz differ
diff --git a/gems/dry-schema/1.6/advanced/index.html b/gems/dry-schema/1.6/advanced/index.html
index c6b252b0e2..cb2d66a190 100644
--- a/gems/dry-schema/1.6/advanced/index.html
+++ b/gems/dry-schema/1.6/advanced/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Advanced

  • Predicate Logic
  • Composing schemas
  • Unexpected keys
  • diff --git a/gems/dry-schema/1.6/advanced/index.html.gz b/gems/dry-schema/1.6/advanced/index.html.gz index d0ec25857d..f7ea7391f8 100644 Binary files a/gems/dry-schema/1.6/advanced/index.html.gz and b/gems/dry-schema/1.6/advanced/index.html.gz differ diff --git a/gems/dry-schema/1.6/advanced/key-maps/index.html b/gems/dry-schema/1.6/advanced/key-maps/index.html index f6c1a57dc1..ecf2d92910 100644 --- a/gems/dry-schema/1.6/advanced/key-maps/index.html +++ b/gems/dry-schema/1.6/advanced/key-maps/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

+});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

  • Rebuild the original input hash by rejecting unknown keys
  • diff --git a/gems/dry-schema/1.6/advanced/key-maps/index.html.gz b/gems/dry-schema/1.6/advanced/key-maps/index.html.gz index c2f302e114..aaebe19756 100644 Binary files a/gems/dry-schema/1.6/advanced/key-maps/index.html.gz and b/gems/dry-schema/1.6/advanced/key-maps/index.html.gz differ diff --git a/gems/dry-schema/1.6/advanced/predicate-logic/index.html b/gems/dry-schema/1.6/advanced/predicate-logic/index.html index f2ea103f89..b074f7592d 100644 --- a/gems/dry-schema/1.6/advanced/predicate-logic/index.html +++ b/gems/dry-schema/1.6/advanced/predicate-logic/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

+});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

This document explains how rule composition works in terms of predicate logic.

Processor steps

+});

Processor steps

Warning
diff --git a/gems/dry-schema/1.6/advanced/processor-steps/index.html.gz b/gems/dry-schema/1.6/advanced/processor-steps/index.html.gz index d92395ee2d..49060a98cc 100644 Binary files a/gems/dry-schema/1.6/advanced/processor-steps/index.html.gz and b/gems/dry-schema/1.6/advanced/processor-steps/index.html.gz differ diff --git a/gems/dry-schema/1.6/advanced/rule-ast/index.html b/gems/dry-schema/1.6/advanced/rule-ast/index.html index 01c31c46e6..c64a5fc55a 100644 --- a/gems/dry-schema/1.6/advanced/rule-ast/index.html +++ b/gems/dry-schema/1.6/advanced/rule-ast/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Rule AST

The DSL in dry-schema is used to create rule objects that are provided by dry-logic. These rules are built using an AST, which uses simple data structures to represent predicates and how they are composed into complex rules and operations.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

In order to use this type of validation, you need to enable it via config:

# Enable it globally
diff --git a/gems/dry-schema/1.6/advanced/unexpected-keys/index.html.gz b/gems/dry-schema/1.6/advanced/unexpected-keys/index.html.gz
index e3251a70ba..e90263881e 100644
Binary files a/gems/dry-schema/1.6/advanced/unexpected-keys/index.html.gz and b/gems/dry-schema/1.6/advanced/unexpected-keys/index.html.gz differ
diff --git a/gems/dry-schema/1.6/basics/built-in-predicates/index.html b/gems/dry-schema/1.6/basics/built-in-predicates/index.html
index 48482ba467..661caa9fa1 100644
--- a/gems/dry-schema/1.6/basics/built-in-predicates/index.html
+++ b/gems/dry-schema/1.6/basics/built-in-predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in predicates

The DSL supports many built-in predicates that can be used to verify validity of the input. If the predicates do not meet your requirements, you probably want to look at dry-validation which offers a more advanced way of defining validations.

+});

Basics

Here's a basic example where we validate the following things:

  • The input must have a key called :email diff --git a/gems/dry-schema/1.6/basics/index.html.gz b/gems/dry-schema/1.6/basics/index.html.gz index b369a744fe..a6399b645e 100644 Binary files a/gems/dry-schema/1.6/basics/index.html.gz and b/gems/dry-schema/1.6/basics/index.html.gz differ diff --git a/gems/dry-schema/1.6/basics/macros/index.html b/gems/dry-schema/1.6/basics/macros/index.html index 7991775f2d..cefa5c1686 100644 --- a/gems/dry-schema/1.6/basics/macros/index.html +++ b/gems/dry-schema/1.6/basics/macros/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Macros

Defining rules using blocks is very flexible and powerful; however, in most common cases repeatedly defining the same rules leads to boilerplate code. That's why dry-schema's DSL provides convenient macros to reduce that boilerplate. Every macro can be expanded to its block-based equivalent.

+});

Type specs

+});

Type specs

Warning
diff --git a/gems/dry-schema/1.6/basics/type-specs/index.html.gz b/gems/dry-schema/1.6/basics/type-specs/index.html.gz index 9ad49b58f0..54bf800c8f 100644 Binary files a/gems/dry-schema/1.6/basics/type-specs/index.html.gz and b/gems/dry-schema/1.6/basics/type-specs/index.html.gz differ diff --git a/gems/dry-schema/1.6/basics/working-with-schemas/index.html b/gems/dry-schema/1.6/basics/working-with-schemas/index.html index 2a52e07689..72c125ae89 100644 --- a/gems/dry-schema/1.6/basics/working-with-schemas/index.html +++ b/gems/dry-schema/1.6/basics/working-with-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

+});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

Schema definition best practices:

diff --git a/gems/dry-schema/1.6/basics/working-with-schemas/index.html.gz b/gems/dry-schema/1.6/basics/working-with-schemas/index.html.gz index 75ba4873b9..a0023a7fae 100644 Binary files a/gems/dry-schema/1.6/basics/working-with-schemas/index.html.gz and b/gems/dry-schema/1.6/basics/working-with-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.6/error-messages/index.html b/gems/dry-schema/1.6/error-messages/index.html index 971d2c1f6b..d0c29cbc91 100644 --- a/gems/dry-schema/1.6/error-messages/index.html +++ b/gems/dry-schema/1.6/error-messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Error messages

By default dry-schema comes with a set of pre-defined error messages for every built-in predicate. They are defined in a yaml file which is shipped with the gem. This file is compatible with I18n format.

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

# enable :hints
 
 Dry::Schema.load_extensions(:hints)
diff --git a/gems/dry-schema/1.6/extensions/hints/index.html.gz b/gems/dry-schema/1.6/extensions/hints/index.html.gz
index cbddf6d206..db88a60253 100644
Binary files a/gems/dry-schema/1.6/extensions/hints/index.html.gz and b/gems/dry-schema/1.6/extensions/hints/index.html.gz differ
diff --git a/gems/dry-schema/1.6/extensions/index.html b/gems/dry-schema/1.6/extensions/index.html
index 37dc7212d6..4df701c4a1 100644
--- a/gems/dry-schema/1.6/extensions/index.html
+++ b/gems/dry-schema/1.6/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-schema can be extended with extension. Those extensions are loaded with Dry::Schema.load_extensions.

Available extensions:

diff --git a/gems/dry-schema/1.6/extensions/index.html.gz b/gems/dry-schema/1.6/extensions/index.html.gz index 897ac59cf5..9cd8221607 100644 Binary files a/gems/dry-schema/1.6/extensions/index.html.gz and b/gems/dry-schema/1.6/extensions/index.html.gz differ diff --git a/gems/dry-schema/1.6/extensions/info/index.html b/gems/dry-schema/1.6/extensions/info/index.html index 580fa249dd..579c9d040a 100644 --- a/gems/dry-schema/1.6/extensions/info/index.html +++ b/gems/dry-schema/1.6/extensions/info/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

+});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

WARN The info data structure is not stable yet and may change before 2.0.0 depending on the user feedback. diff --git a/gems/dry-schema/1.6/extensions/info/index.html.gz b/gems/dry-schema/1.6/extensions/info/index.html.gz index 46365473bc..56c0b7d62c 100644 Binary files a/gems/dry-schema/1.6/extensions/info/index.html.gz and b/gems/dry-schema/1.6/extensions/info/index.html.gz differ diff --git a/gems/dry-schema/1.6/extensions/monads/index.html b/gems/dry-schema/1.6/extensions/monads/index.html index 9155f267ac..a9c92c871e 100644 --- a/gems/dry-schema/1.6/extensions/monads/index.html +++ b/gems/dry-schema/1.6/extensions/monads/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Monads

The monads extension makes Dry::Schema::Result objects compatible with dry-monads.

To enable the extension:

require 'dry/schema'
diff --git a/gems/dry-schema/1.6/extensions/monads/index.html.gz b/gems/dry-schema/1.6/extensions/monads/index.html.gz
index d8b2f91137..66758ef5cf 100644
Binary files a/gems/dry-schema/1.6/extensions/monads/index.html.gz and b/gems/dry-schema/1.6/extensions/monads/index.html.gz differ
diff --git a/gems/dry-schema/1.6/index.html b/gems/dry-schema/1.6/index.html
index bdd3e184d1..7150d21fc1 100644
--- a/gems/dry-schema/1.6/index.html
+++ b/gems/dry-schema/1.6/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

+});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

Main focus of this library is on:

diff --git a/gems/dry-schema/1.6/index.html.gz b/gems/dry-schema/1.6/index.html.gz index 4fde8e2fd3..15913c1f15 100644 Binary files a/gems/dry-schema/1.6/index.html.gz and b/gems/dry-schema/1.6/index.html.gz differ diff --git a/gems/dry-schema/1.6/json/index.html b/gems/dry-schema/1.6/json/index.html index fc883f4c9a..9bdd67928e 100644 --- a/gems/dry-schema/1.6/json/index.html +++ b/gems/dry-schema/1.6/json/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

JSON

To validate JSON data structures, you can use JSON schemas. The difference between Params and JSON is coercion logic. Refer to dry-types documentation for more information about supported JSON coercions.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

This also comes with the benefit of being explicit about the type expectation. In the example below we explicitly state that :age can be omitted or if present it must be an integer and it must be greater than 18.

Params

Probably the most common use case is to validate HTTP params. This is a special kind of a validation for a couple of reasons:

  • The input is a hash with stringified keys
  • diff --git a/gems/dry-schema/1.6/params/index.html.gz b/gems/dry-schema/1.6/params/index.html.gz index 4f165bde3a..1529f5f078 100644 Binary files a/gems/dry-schema/1.6/params/index.html.gz and b/gems/dry-schema/1.6/params/index.html.gz differ diff --git a/gems/dry-schema/1.6/reusing-schemas/index.html b/gems/dry-schema/1.6/reusing-schemas/index.html index 1cfb0be152..3693682196 100644 --- a/gems/dry-schema/1.6/reusing-schemas/index.html +++ b/gems/dry-schema/1.6/reusing-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Reusing schemas

You can easily reuse existing schemas using nested-schema syntax:

AddressSchema = Dry::Schema.Params do
   required(:street).filled(:string)
   required(:city).filled(:string)
diff --git a/gems/dry-schema/1.6/reusing-schemas/index.html.gz b/gems/dry-schema/1.6/reusing-schemas/index.html.gz
index aa0934ac9a..de74879a41 100644
Binary files a/gems/dry-schema/1.6/reusing-schemas/index.html.gz and b/gems/dry-schema/1.6/reusing-schemas/index.html.gz differ
diff --git a/gems/dry-schema/1.7/advanced/composing-schemas/index.html b/gems/dry-schema/1.7/advanced/composing-schemas/index.html
index 744e58c837..bb0a50c02e 100644
--- a/gems/dry-schema/1.7/advanced/composing-schemas/index.html
+++ b/gems/dry-schema/1.7/advanced/composing-schemas/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Composing schemas

+});

Composing schemas

Warning
diff --git a/gems/dry-schema/1.7/advanced/composing-schemas/index.html.gz b/gems/dry-schema/1.7/advanced/composing-schemas/index.html.gz index 5ee90e5a02..8821da69cb 100644 Binary files a/gems/dry-schema/1.7/advanced/composing-schemas/index.html.gz and b/gems/dry-schema/1.7/advanced/composing-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.7/advanced/custom-types/index.html b/gems/dry-schema/1.7/advanced/custom-types/index.html index 9feda6b17d..7119019552 100644 --- a/gems/dry-schema/1.7/advanced/custom-types/index.html +++ b/gems/dry-schema/1.7/advanced/custom-types/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

+});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

StrippedString = Types::String.constructor(&:strip)
 
 Schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.7/advanced/custom-types/index.html.gz b/gems/dry-schema/1.7/advanced/custom-types/index.html.gz
index 33968cfd56..d6bfe22dbf 100644
Binary files a/gems/dry-schema/1.7/advanced/custom-types/index.html.gz and b/gems/dry-schema/1.7/advanced/custom-types/index.html.gz differ
diff --git a/gems/dry-schema/1.7/advanced/filtering/index.html b/gems/dry-schema/1.7/advanced/filtering/index.html
index 7a0bbc8b4d..53ecccfc22 100644
--- a/gems/dry-schema/1.7/advanced/filtering/index.html
+++ b/gems/dry-schema/1.7/advanced/filtering/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

+});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

Here's a common example - your system supports only one specific date format, and you want to validate that the input value has this format before trying to coerce it into a date object. In order to do that, you can use filter macro, which works just like value, but its predicates are applied before value coercion:

schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.7/advanced/filtering/index.html.gz b/gems/dry-schema/1.7/advanced/filtering/index.html.gz
index c13d681482..4695283f51 100644
Binary files a/gems/dry-schema/1.7/advanced/filtering/index.html.gz and b/gems/dry-schema/1.7/advanced/filtering/index.html.gz differ
diff --git a/gems/dry-schema/1.7/advanced/index.html b/gems/dry-schema/1.7/advanced/index.html
index c095e2941d..c891a16586 100644
--- a/gems/dry-schema/1.7/advanced/index.html
+++ b/gems/dry-schema/1.7/advanced/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Advanced

  • Predicate Logic
  • Composing schemas
  • Unexpected keys
  • diff --git a/gems/dry-schema/1.7/advanced/index.html.gz b/gems/dry-schema/1.7/advanced/index.html.gz index e86899cb37..9a01bd054c 100644 Binary files a/gems/dry-schema/1.7/advanced/index.html.gz and b/gems/dry-schema/1.7/advanced/index.html.gz differ diff --git a/gems/dry-schema/1.7/advanced/key-maps/index.html b/gems/dry-schema/1.7/advanced/key-maps/index.html index 1d435e5587..d3befdf7c8 100644 --- a/gems/dry-schema/1.7/advanced/key-maps/index.html +++ b/gems/dry-schema/1.7/advanced/key-maps/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

+});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

  • Rebuild the original input hash by rejecting unknown keys
  • diff --git a/gems/dry-schema/1.7/advanced/key-maps/index.html.gz b/gems/dry-schema/1.7/advanced/key-maps/index.html.gz index f81ed797f5..34635343fa 100644 Binary files a/gems/dry-schema/1.7/advanced/key-maps/index.html.gz and b/gems/dry-schema/1.7/advanced/key-maps/index.html.gz differ diff --git a/gems/dry-schema/1.7/advanced/predicate-logic/index.html b/gems/dry-schema/1.7/advanced/predicate-logic/index.html index e1c4c8cf90..a6c3270bb8 100644 --- a/gems/dry-schema/1.7/advanced/predicate-logic/index.html +++ b/gems/dry-schema/1.7/advanced/predicate-logic/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

+});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

This document explains how rule composition works in terms of predicate logic.

Processor steps

+});

Processor steps

Warning
diff --git a/gems/dry-schema/1.7/advanced/processor-steps/index.html.gz b/gems/dry-schema/1.7/advanced/processor-steps/index.html.gz index 7ffb7b3346..45b98e1cbf 100644 Binary files a/gems/dry-schema/1.7/advanced/processor-steps/index.html.gz and b/gems/dry-schema/1.7/advanced/processor-steps/index.html.gz differ diff --git a/gems/dry-schema/1.7/advanced/rule-ast/index.html b/gems/dry-schema/1.7/advanced/rule-ast/index.html index 9f03553786..8ba8714363 100644 --- a/gems/dry-schema/1.7/advanced/rule-ast/index.html +++ b/gems/dry-schema/1.7/advanced/rule-ast/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Rule AST

The DSL in dry-schema is used to create rule objects that are provided by dry-logic. These rules are built using an AST, which uses simple data structures to represent predicates and how they are composed into complex rules and operations.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

In order to use this type of validation, you need to enable it via config:

# Enable it globally
diff --git a/gems/dry-schema/1.7/advanced/unexpected-keys/index.html.gz b/gems/dry-schema/1.7/advanced/unexpected-keys/index.html.gz
index 37a56b1db6..caadd4b5e4 100644
Binary files a/gems/dry-schema/1.7/advanced/unexpected-keys/index.html.gz and b/gems/dry-schema/1.7/advanced/unexpected-keys/index.html.gz differ
diff --git a/gems/dry-schema/1.7/basics/built-in-predicates/index.html b/gems/dry-schema/1.7/basics/built-in-predicates/index.html
index 90dbefe84e..ec193bb50c 100644
--- a/gems/dry-schema/1.7/basics/built-in-predicates/index.html
+++ b/gems/dry-schema/1.7/basics/built-in-predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in predicates

The DSL supports many built-in predicates that can be used to verify validity of the input. If the predicates do not meet your requirements, you probably want to look at dry-validation which offers a more advanced way of defining validations.

+});

Basics

Here's a basic example where we validate the following things:

  • The input must have a key called :email diff --git a/gems/dry-schema/1.7/basics/index.html.gz b/gems/dry-schema/1.7/basics/index.html.gz index 41759fafc8..5f7f4c9a78 100644 Binary files a/gems/dry-schema/1.7/basics/index.html.gz and b/gems/dry-schema/1.7/basics/index.html.gz differ diff --git a/gems/dry-schema/1.7/basics/macros/index.html b/gems/dry-schema/1.7/basics/macros/index.html index 9c001116e6..cc24433df0 100644 --- a/gems/dry-schema/1.7/basics/macros/index.html +++ b/gems/dry-schema/1.7/basics/macros/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Macros

Defining rules using blocks is very flexible and powerful; however, in most common cases repeatedly defining the same rules leads to boilerplate code. That's why dry-schema's DSL provides convenient macros to reduce that boilerplate. Every macro can be expanded to its block-based equivalent.

+});

Type specs

+});

Type specs

Warning
diff --git a/gems/dry-schema/1.7/basics/type-specs/index.html.gz b/gems/dry-schema/1.7/basics/type-specs/index.html.gz index 80ec8c168a..f0b319c9cf 100644 Binary files a/gems/dry-schema/1.7/basics/type-specs/index.html.gz and b/gems/dry-schema/1.7/basics/type-specs/index.html.gz differ diff --git a/gems/dry-schema/1.7/basics/working-with-schemas/index.html b/gems/dry-schema/1.7/basics/working-with-schemas/index.html index 273af12abf..68b4e874a1 100644 --- a/gems/dry-schema/1.7/basics/working-with-schemas/index.html +++ b/gems/dry-schema/1.7/basics/working-with-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

+});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

Schema definition best practices:

diff --git a/gems/dry-schema/1.7/basics/working-with-schemas/index.html.gz b/gems/dry-schema/1.7/basics/working-with-schemas/index.html.gz index 6ecc2b06c6..46c0cd7065 100644 Binary files a/gems/dry-schema/1.7/basics/working-with-schemas/index.html.gz and b/gems/dry-schema/1.7/basics/working-with-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.7/error-messages/index.html b/gems/dry-schema/1.7/error-messages/index.html index 8c0bc8edaa..d860cb0152 100644 --- a/gems/dry-schema/1.7/error-messages/index.html +++ b/gems/dry-schema/1.7/error-messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Error messages

By default dry-schema comes with a set of pre-defined error messages for every built-in predicate. They are defined in a yaml file which is shipped with the gem. This file is compatible with I18n format.

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

# enable :hints
 
 Dry::Schema.load_extensions(:hints)
diff --git a/gems/dry-schema/1.7/extensions/hints/index.html.gz b/gems/dry-schema/1.7/extensions/hints/index.html.gz
index c6bee94e9d..ad74e9f958 100644
Binary files a/gems/dry-schema/1.7/extensions/hints/index.html.gz and b/gems/dry-schema/1.7/extensions/hints/index.html.gz differ
diff --git a/gems/dry-schema/1.7/extensions/index.html b/gems/dry-schema/1.7/extensions/index.html
index c7c85c767f..e5bd6e2859 100644
--- a/gems/dry-schema/1.7/extensions/index.html
+++ b/gems/dry-schema/1.7/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-schema can be extended with extension. Those extensions are loaded with Dry::Schema.load_extensions.

Available extensions:

diff --git a/gems/dry-schema/1.7/extensions/index.html.gz b/gems/dry-schema/1.7/extensions/index.html.gz index 5945128aa0..a7d66edb02 100644 Binary files a/gems/dry-schema/1.7/extensions/index.html.gz and b/gems/dry-schema/1.7/extensions/index.html.gz differ diff --git a/gems/dry-schema/1.7/extensions/info/index.html b/gems/dry-schema/1.7/extensions/info/index.html index fffb6efb18..2c36cf3b60 100644 --- a/gems/dry-schema/1.7/extensions/info/index.html +++ b/gems/dry-schema/1.7/extensions/info/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

+});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

WARN The info data structure is not stable yet and may change before 2.0.0 depending on the user feedback. diff --git a/gems/dry-schema/1.7/extensions/info/index.html.gz b/gems/dry-schema/1.7/extensions/info/index.html.gz index aa51625a96..6d0262a26f 100644 Binary files a/gems/dry-schema/1.7/extensions/info/index.html.gz and b/gems/dry-schema/1.7/extensions/info/index.html.gz differ diff --git a/gems/dry-schema/1.7/extensions/monads/index.html b/gems/dry-schema/1.7/extensions/monads/index.html index 9be058b1c7..4dbe5061d8 100644 --- a/gems/dry-schema/1.7/extensions/monads/index.html +++ b/gems/dry-schema/1.7/extensions/monads/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Monads

The monads extension makes Dry::Schema::Result objects compatible with dry-monads.

To enable the extension:

require 'dry/schema'
diff --git a/gems/dry-schema/1.7/extensions/monads/index.html.gz b/gems/dry-schema/1.7/extensions/monads/index.html.gz
index 05174b19fc..da7ab8af12 100644
Binary files a/gems/dry-schema/1.7/extensions/monads/index.html.gz and b/gems/dry-schema/1.7/extensions/monads/index.html.gz differ
diff --git a/gems/dry-schema/1.7/index.html b/gems/dry-schema/1.7/index.html
index b7de734448..baa4728948 100644
--- a/gems/dry-schema/1.7/index.html
+++ b/gems/dry-schema/1.7/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

+});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

Main focus of this library is on:

diff --git a/gems/dry-schema/1.7/index.html.gz b/gems/dry-schema/1.7/index.html.gz index 1faf557f5e..4e1de07b0f 100644 Binary files a/gems/dry-schema/1.7/index.html.gz and b/gems/dry-schema/1.7/index.html.gz differ diff --git a/gems/dry-schema/1.7/json/index.html b/gems/dry-schema/1.7/json/index.html index 33d3f61520..9677d652e2 100644 --- a/gems/dry-schema/1.7/json/index.html +++ b/gems/dry-schema/1.7/json/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

JSON

To validate JSON data structures, you can use JSON schemas. The difference between Params and JSON is coercion logic. Refer to dry-types documentation for more information about supported JSON coercions.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

This also comes with the benefit of being explicit about the type expectation. In the example below we explicitly state that :age can be omitted or if present it must be an integer and it must be greater than 18.

Params

Probably the most common use case is to validate HTTP params. This is a special kind of a validation for a couple of reasons:

  • The input is a hash with stringified keys
  • diff --git a/gems/dry-schema/1.7/params/index.html.gz b/gems/dry-schema/1.7/params/index.html.gz index a05fc2bbc9..8a5532f90c 100644 Binary files a/gems/dry-schema/1.7/params/index.html.gz and b/gems/dry-schema/1.7/params/index.html.gz differ diff --git a/gems/dry-schema/1.7/reusing-schemas/index.html b/gems/dry-schema/1.7/reusing-schemas/index.html index 9286407b7e..fa4b5b6c9e 100644 --- a/gems/dry-schema/1.7/reusing-schemas/index.html +++ b/gems/dry-schema/1.7/reusing-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Reusing schemas

You can easily reuse existing schemas using nested-schema syntax:

AddressSchema = Dry::Schema.Params do
   required(:street).filled(:string)
   required(:city).filled(:string)
diff --git a/gems/dry-schema/1.7/reusing-schemas/index.html.gz b/gems/dry-schema/1.7/reusing-schemas/index.html.gz
index 91704f1db0..bed542f224 100644
Binary files a/gems/dry-schema/1.7/reusing-schemas/index.html.gz and b/gems/dry-schema/1.7/reusing-schemas/index.html.gz differ
diff --git a/gems/dry-schema/1.8/advanced/composing-schemas/index.html b/gems/dry-schema/1.8/advanced/composing-schemas/index.html
index fba8063b36..4fc34695d9 100644
--- a/gems/dry-schema/1.8/advanced/composing-schemas/index.html
+++ b/gems/dry-schema/1.8/advanced/composing-schemas/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Composing schemas

+});

Composing schemas

Warning
diff --git a/gems/dry-schema/1.8/advanced/composing-schemas/index.html.gz b/gems/dry-schema/1.8/advanced/composing-schemas/index.html.gz index 1d9c28bf5a..f2adb42f52 100644 Binary files a/gems/dry-schema/1.8/advanced/composing-schemas/index.html.gz and b/gems/dry-schema/1.8/advanced/composing-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.8/advanced/custom-types/index.html b/gems/dry-schema/1.8/advanced/custom-types/index.html index 0c123f52ef..e0499781ef 100644 --- a/gems/dry-schema/1.8/advanced/custom-types/index.html +++ b/gems/dry-schema/1.8/advanced/custom-types/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

+});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

StrippedString = Types::String.constructor(&:strip)
 
 Schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.8/advanced/custom-types/index.html.gz b/gems/dry-schema/1.8/advanced/custom-types/index.html.gz
index f33c52cda7..6d67f63f72 100644
Binary files a/gems/dry-schema/1.8/advanced/custom-types/index.html.gz and b/gems/dry-schema/1.8/advanced/custom-types/index.html.gz differ
diff --git a/gems/dry-schema/1.8/advanced/filtering/index.html b/gems/dry-schema/1.8/advanced/filtering/index.html
index 00873e1f24..d7d644d0cd 100644
--- a/gems/dry-schema/1.8/advanced/filtering/index.html
+++ b/gems/dry-schema/1.8/advanced/filtering/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

+});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

Here's a common example - your system supports only one specific date format, and you want to validate that the input value has this format before trying to coerce it into a date object. In order to do that, you can use filter macro, which works just like value, but its predicates are applied before value coercion:

schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.8/advanced/filtering/index.html.gz b/gems/dry-schema/1.8/advanced/filtering/index.html.gz
index 33e9887c1f..0c35742aee 100644
Binary files a/gems/dry-schema/1.8/advanced/filtering/index.html.gz and b/gems/dry-schema/1.8/advanced/filtering/index.html.gz differ
diff --git a/gems/dry-schema/1.8/advanced/index.html b/gems/dry-schema/1.8/advanced/index.html
index 3e92ad54be..52f80afbed 100644
--- a/gems/dry-schema/1.8/advanced/index.html
+++ b/gems/dry-schema/1.8/advanced/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Advanced

  • Predicate Logic
  • Composing schemas
  • Unexpected keys
  • diff --git a/gems/dry-schema/1.8/advanced/index.html.gz b/gems/dry-schema/1.8/advanced/index.html.gz index eafaa49a8f..3bc4f046f3 100644 Binary files a/gems/dry-schema/1.8/advanced/index.html.gz and b/gems/dry-schema/1.8/advanced/index.html.gz differ diff --git a/gems/dry-schema/1.8/advanced/key-maps/index.html b/gems/dry-schema/1.8/advanced/key-maps/index.html index 23714eb708..cb41de13df 100644 --- a/gems/dry-schema/1.8/advanced/key-maps/index.html +++ b/gems/dry-schema/1.8/advanced/key-maps/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

+});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

  • Rebuild the original input hash by rejecting unknown keys
  • diff --git a/gems/dry-schema/1.8/advanced/key-maps/index.html.gz b/gems/dry-schema/1.8/advanced/key-maps/index.html.gz index 5b9230386d..ee8a0571cd 100644 Binary files a/gems/dry-schema/1.8/advanced/key-maps/index.html.gz and b/gems/dry-schema/1.8/advanced/key-maps/index.html.gz differ diff --git a/gems/dry-schema/1.8/advanced/predicate-logic/index.html b/gems/dry-schema/1.8/advanced/predicate-logic/index.html index 4b902b146e..cf0cad01bd 100644 --- a/gems/dry-schema/1.8/advanced/predicate-logic/index.html +++ b/gems/dry-schema/1.8/advanced/predicate-logic/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

+});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

This document explains how rule composition works in terms of predicate logic.

Processor steps

+});

Processor steps

Warning
diff --git a/gems/dry-schema/1.8/advanced/processor-steps/index.html.gz b/gems/dry-schema/1.8/advanced/processor-steps/index.html.gz index 97e81e3d0f..6e842006f3 100644 Binary files a/gems/dry-schema/1.8/advanced/processor-steps/index.html.gz and b/gems/dry-schema/1.8/advanced/processor-steps/index.html.gz differ diff --git a/gems/dry-schema/1.8/advanced/rule-ast/index.html b/gems/dry-schema/1.8/advanced/rule-ast/index.html index 993a5087e6..b331ff8d8f 100644 --- a/gems/dry-schema/1.8/advanced/rule-ast/index.html +++ b/gems/dry-schema/1.8/advanced/rule-ast/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Rule AST

The DSL in dry-schema is used to create rule objects that are provided by dry-logic. These rules are built using an AST, which uses simple data structures to represent predicates and how they are composed into complex rules and operations.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

In order to use this type of validation, you need to enable it via config:

# Enable it globally
diff --git a/gems/dry-schema/1.8/advanced/unexpected-keys/index.html.gz b/gems/dry-schema/1.8/advanced/unexpected-keys/index.html.gz
index 20c9ad8bd0..94db9188a9 100644
Binary files a/gems/dry-schema/1.8/advanced/unexpected-keys/index.html.gz and b/gems/dry-schema/1.8/advanced/unexpected-keys/index.html.gz differ
diff --git a/gems/dry-schema/1.8/basics/built-in-predicates/index.html b/gems/dry-schema/1.8/basics/built-in-predicates/index.html
index abb3196fb0..6a0cef042f 100644
--- a/gems/dry-schema/1.8/basics/built-in-predicates/index.html
+++ b/gems/dry-schema/1.8/basics/built-in-predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in predicates

The DSL supports many built-in predicates that can be used to verify validity of the input. If the predicates do not meet your requirements, you probably want to look at dry-validation which offers a more advanced way of defining validations.

+});

Basics

Here's a basic example where we validate the following things:

  • The input must have a key called :email diff --git a/gems/dry-schema/1.8/basics/index.html.gz b/gems/dry-schema/1.8/basics/index.html.gz index 10953c9857..14241dc3bf 100644 Binary files a/gems/dry-schema/1.8/basics/index.html.gz and b/gems/dry-schema/1.8/basics/index.html.gz differ diff --git a/gems/dry-schema/1.8/basics/macros/index.html b/gems/dry-schema/1.8/basics/macros/index.html index c1fe8e6d62..7d918bba61 100644 --- a/gems/dry-schema/1.8/basics/macros/index.html +++ b/gems/dry-schema/1.8/basics/macros/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Macros

Defining rules using blocks is very flexible and powerful; however, in most common cases repeatedly defining the same rules leads to boilerplate code. That's why dry-schema's DSL provides convenient macros to reduce that boilerplate. Every macro can be expanded to its block-based equivalent.

+});

Type specs

+});

Type specs

Warning
diff --git a/gems/dry-schema/1.8/basics/type-specs/index.html.gz b/gems/dry-schema/1.8/basics/type-specs/index.html.gz index a60c8bf24d..f331af0337 100644 Binary files a/gems/dry-schema/1.8/basics/type-specs/index.html.gz and b/gems/dry-schema/1.8/basics/type-specs/index.html.gz differ diff --git a/gems/dry-schema/1.8/basics/working-with-schemas/index.html b/gems/dry-schema/1.8/basics/working-with-schemas/index.html index 2e1217c137..2631695c48 100644 --- a/gems/dry-schema/1.8/basics/working-with-schemas/index.html +++ b/gems/dry-schema/1.8/basics/working-with-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

+});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

Schema definition best practices:

diff --git a/gems/dry-schema/1.8/basics/working-with-schemas/index.html.gz b/gems/dry-schema/1.8/basics/working-with-schemas/index.html.gz index 7712fc67fd..5fad8738eb 100644 Binary files a/gems/dry-schema/1.8/basics/working-with-schemas/index.html.gz and b/gems/dry-schema/1.8/basics/working-with-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.8/error-messages/index.html b/gems/dry-schema/1.8/error-messages/index.html index fd18fb6e7c..49b132fe2d 100644 --- a/gems/dry-schema/1.8/error-messages/index.html +++ b/gems/dry-schema/1.8/error-messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Error messages

By default dry-schema comes with a set of pre-defined error messages for every built-in predicate. They are defined in a yaml file which is shipped with the gem. This file is compatible with I18n format.

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

# enable :hints
 
 Dry::Schema.load_extensions(:hints)
diff --git a/gems/dry-schema/1.8/extensions/hints/index.html.gz b/gems/dry-schema/1.8/extensions/hints/index.html.gz
index 214cfa27c3..65789bc65f 100644
Binary files a/gems/dry-schema/1.8/extensions/hints/index.html.gz and b/gems/dry-schema/1.8/extensions/hints/index.html.gz differ
diff --git a/gems/dry-schema/1.8/extensions/index.html b/gems/dry-schema/1.8/extensions/index.html
index 7e3793c750..c576a0def0 100644
--- a/gems/dry-schema/1.8/extensions/index.html
+++ b/gems/dry-schema/1.8/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-schema can be extended with extension. Those extensions are loaded with Dry::Schema.load_extensions.

Available extensions:

diff --git a/gems/dry-schema/1.8/extensions/index.html.gz b/gems/dry-schema/1.8/extensions/index.html.gz index 31bb00f7bb..60d36e6ffe 100644 Binary files a/gems/dry-schema/1.8/extensions/index.html.gz and b/gems/dry-schema/1.8/extensions/index.html.gz differ diff --git a/gems/dry-schema/1.8/extensions/info/index.html b/gems/dry-schema/1.8/extensions/info/index.html index 1b6c058ef4..b7d70fb35d 100644 --- a/gems/dry-schema/1.8/extensions/info/index.html +++ b/gems/dry-schema/1.8/extensions/info/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

+});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

WARN The info data structure is not stable yet and may change before 2.0.0 depending on the user feedback. diff --git a/gems/dry-schema/1.8/extensions/info/index.html.gz b/gems/dry-schema/1.8/extensions/info/index.html.gz index a6279f5fe6..0762491a02 100644 Binary files a/gems/dry-schema/1.8/extensions/info/index.html.gz and b/gems/dry-schema/1.8/extensions/info/index.html.gz differ diff --git a/gems/dry-schema/1.8/extensions/monads/index.html b/gems/dry-schema/1.8/extensions/monads/index.html index 0b3d11a3de..ca9b7fd68e 100644 --- a/gems/dry-schema/1.8/extensions/monads/index.html +++ b/gems/dry-schema/1.8/extensions/monads/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Monads

The monads extension makes Dry::Schema::Result objects compatible with dry-monads.

To enable the extension:

require 'dry/schema'
diff --git a/gems/dry-schema/1.8/extensions/monads/index.html.gz b/gems/dry-schema/1.8/extensions/monads/index.html.gz
index d13b26d86c..cceebe01a2 100644
Binary files a/gems/dry-schema/1.8/extensions/monads/index.html.gz and b/gems/dry-schema/1.8/extensions/monads/index.html.gz differ
diff --git a/gems/dry-schema/1.8/index.html b/gems/dry-schema/1.8/index.html
index ce0c502262..fcaa47f670 100644
--- a/gems/dry-schema/1.8/index.html
+++ b/gems/dry-schema/1.8/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

+});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

Main focus of this library is on:

diff --git a/gems/dry-schema/1.8/index.html.gz b/gems/dry-schema/1.8/index.html.gz index 46673ea199..0f17224e8d 100644 Binary files a/gems/dry-schema/1.8/index.html.gz and b/gems/dry-schema/1.8/index.html.gz differ diff --git a/gems/dry-schema/1.8/json/index.html b/gems/dry-schema/1.8/json/index.html index e60e087f92..2cce06ea90 100644 --- a/gems/dry-schema/1.8/json/index.html +++ b/gems/dry-schema/1.8/json/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

JSON

To validate JSON data structures, you can use JSON schemas. The difference between Params and JSON is coercion logic. Refer to dry-types documentation for more information about supported JSON coercions.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

This also comes with the benefit of being explicit about the type expectation. In the example below we explicitly state that :age can be omitted or if present it must be an integer and it must be greater than 18.

Params

Probably the most common use case is to validate HTTP params. This is a special kind of a validation for a couple of reasons:

  • The input is a hash with stringified keys
  • diff --git a/gems/dry-schema/1.8/params/index.html.gz b/gems/dry-schema/1.8/params/index.html.gz index ad0448c24a..c024e50ce0 100644 Binary files a/gems/dry-schema/1.8/params/index.html.gz and b/gems/dry-schema/1.8/params/index.html.gz differ diff --git a/gems/dry-schema/1.8/reusing-schemas/index.html b/gems/dry-schema/1.8/reusing-schemas/index.html index 01f51fc2e1..3ed2cb7090 100644 --- a/gems/dry-schema/1.8/reusing-schemas/index.html +++ b/gems/dry-schema/1.8/reusing-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Reusing schemas

You can easily reuse existing schemas using nested-schema syntax:

AddressSchema = Dry::Schema.Params do
   required(:street).filled(:string)
   required(:city).filled(:string)
diff --git a/gems/dry-schema/1.8/reusing-schemas/index.html.gz b/gems/dry-schema/1.8/reusing-schemas/index.html.gz
index 49f5d4f12e..8ed3d8bc56 100644
Binary files a/gems/dry-schema/1.8/reusing-schemas/index.html.gz and b/gems/dry-schema/1.8/reusing-schemas/index.html.gz differ
diff --git a/gems/dry-schema/1.9/advanced/composing-schemas/index.html b/gems/dry-schema/1.9/advanced/composing-schemas/index.html
index c672e1a1be..cf4ec11472 100644
--- a/gems/dry-schema/1.9/advanced/composing-schemas/index.html
+++ b/gems/dry-schema/1.9/advanced/composing-schemas/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Composing schemas

+});

Composing schemas

Warning
diff --git a/gems/dry-schema/1.9/advanced/composing-schemas/index.html.gz b/gems/dry-schema/1.9/advanced/composing-schemas/index.html.gz index dc707a0dcd..ade9cc68d1 100644 Binary files a/gems/dry-schema/1.9/advanced/composing-schemas/index.html.gz and b/gems/dry-schema/1.9/advanced/composing-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.9/advanced/custom-types/index.html b/gems/dry-schema/1.9/advanced/custom-types/index.html index 5bdcde557e..0748e907bf 100644 --- a/gems/dry-schema/1.9/advanced/custom-types/index.html +++ b/gems/dry-schema/1.9/advanced/custom-types/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

+});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

StrippedString = Types::String.constructor(&:strip)
 
 Schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.9/advanced/custom-types/index.html.gz b/gems/dry-schema/1.9/advanced/custom-types/index.html.gz
index 8e89560ce8..0f26f115d1 100644
Binary files a/gems/dry-schema/1.9/advanced/custom-types/index.html.gz and b/gems/dry-schema/1.9/advanced/custom-types/index.html.gz differ
diff --git a/gems/dry-schema/1.9/advanced/filtering/index.html b/gems/dry-schema/1.9/advanced/filtering/index.html
index ed4ca8c8da..9059c6dc00 100644
--- a/gems/dry-schema/1.9/advanced/filtering/index.html
+++ b/gems/dry-schema/1.9/advanced/filtering/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

+});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

Here's a common example - your system supports only one specific date format, and you want to validate that the input value has this format before trying to coerce it into a date object. In order to do that, you can use filter macro, which works just like value, but its predicates are applied before value coercion:

schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/1.9/advanced/filtering/index.html.gz b/gems/dry-schema/1.9/advanced/filtering/index.html.gz
index 586fd6013e..2b76a251e6 100644
Binary files a/gems/dry-schema/1.9/advanced/filtering/index.html.gz and b/gems/dry-schema/1.9/advanced/filtering/index.html.gz differ
diff --git a/gems/dry-schema/1.9/advanced/index.html b/gems/dry-schema/1.9/advanced/index.html
index d6203a657d..7f10038190 100644
--- a/gems/dry-schema/1.9/advanced/index.html
+++ b/gems/dry-schema/1.9/advanced/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Advanced

  • Predicate Logic
  • Composing schemas
  • Unexpected keys
  • diff --git a/gems/dry-schema/1.9/advanced/index.html.gz b/gems/dry-schema/1.9/advanced/index.html.gz index 9a4c77454a..5b8fef2acd 100644 Binary files a/gems/dry-schema/1.9/advanced/index.html.gz and b/gems/dry-schema/1.9/advanced/index.html.gz differ diff --git a/gems/dry-schema/1.9/advanced/key-maps/index.html b/gems/dry-schema/1.9/advanced/key-maps/index.html index 2793fac04d..63b356008e 100644 --- a/gems/dry-schema/1.9/advanced/key-maps/index.html +++ b/gems/dry-schema/1.9/advanced/key-maps/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

+});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

  • Rebuild the original input hash by rejecting unknown keys
  • diff --git a/gems/dry-schema/1.9/advanced/key-maps/index.html.gz b/gems/dry-schema/1.9/advanced/key-maps/index.html.gz index f529f30894..86c6bd9cff 100644 Binary files a/gems/dry-schema/1.9/advanced/key-maps/index.html.gz and b/gems/dry-schema/1.9/advanced/key-maps/index.html.gz differ diff --git a/gems/dry-schema/1.9/advanced/predicate-logic/index.html b/gems/dry-schema/1.9/advanced/predicate-logic/index.html index 9468cb0c1c..92e94e5316 100644 --- a/gems/dry-schema/1.9/advanced/predicate-logic/index.html +++ b/gems/dry-schema/1.9/advanced/predicate-logic/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

+});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

This document explains how rule composition works in terms of predicate logic.

Processor steps

+});

Processor steps

Warning
diff --git a/gems/dry-schema/1.9/advanced/processor-steps/index.html.gz b/gems/dry-schema/1.9/advanced/processor-steps/index.html.gz index 72439e1cb4..e249e0f869 100644 Binary files a/gems/dry-schema/1.9/advanced/processor-steps/index.html.gz and b/gems/dry-schema/1.9/advanced/processor-steps/index.html.gz differ diff --git a/gems/dry-schema/1.9/advanced/rule-ast/index.html b/gems/dry-schema/1.9/advanced/rule-ast/index.html index 74fc3e4519..443f2befef 100644 --- a/gems/dry-schema/1.9/advanced/rule-ast/index.html +++ b/gems/dry-schema/1.9/advanced/rule-ast/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Rule AST

The DSL in dry-schema is used to create rule objects that are provided by dry-logic. These rules are built using an AST, which uses simple data structures to represent predicates and how they are composed into complex rules and operations.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

In order to use this type of validation, you need to enable it via config:

# Enable it globally
diff --git a/gems/dry-schema/1.9/advanced/unexpected-keys/index.html.gz b/gems/dry-schema/1.9/advanced/unexpected-keys/index.html.gz
index ef35ffa25a..dd9c32cc8e 100644
Binary files a/gems/dry-schema/1.9/advanced/unexpected-keys/index.html.gz and b/gems/dry-schema/1.9/advanced/unexpected-keys/index.html.gz differ
diff --git a/gems/dry-schema/1.9/basics/built-in-predicates/index.html b/gems/dry-schema/1.9/basics/built-in-predicates/index.html
index 7aa40301ec..28428b4386 100644
--- a/gems/dry-schema/1.9/basics/built-in-predicates/index.html
+++ b/gems/dry-schema/1.9/basics/built-in-predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in predicates

The DSL supports many built-in predicates that can be used to verify validity of the input. If the predicates do not meet your requirements, you probably want to look at dry-validation which offers a more advanced way of defining validations.

+});

Basics

Here's a basic example where we validate the following things:

  • The input must have a key called :email diff --git a/gems/dry-schema/1.9/basics/index.html.gz b/gems/dry-schema/1.9/basics/index.html.gz index 377935a4eb..c8baa194ca 100644 Binary files a/gems/dry-schema/1.9/basics/index.html.gz and b/gems/dry-schema/1.9/basics/index.html.gz differ diff --git a/gems/dry-schema/1.9/basics/macros/index.html b/gems/dry-schema/1.9/basics/macros/index.html index aa82054bf8..57c12eab4d 100644 --- a/gems/dry-schema/1.9/basics/macros/index.html +++ b/gems/dry-schema/1.9/basics/macros/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Macros

Defining rules using blocks is very flexible and powerful; however, in most common cases repeatedly defining the same rules leads to boilerplate code. That's why dry-schema's DSL provides convenient macros to reduce that boilerplate. Every macro can be expanded to its block-based equivalent.

+});

Type specs

+});

Type specs

Warning
diff --git a/gems/dry-schema/1.9/basics/type-specs/index.html.gz b/gems/dry-schema/1.9/basics/type-specs/index.html.gz index d675c821fd..10724be7a9 100644 Binary files a/gems/dry-schema/1.9/basics/type-specs/index.html.gz and b/gems/dry-schema/1.9/basics/type-specs/index.html.gz differ diff --git a/gems/dry-schema/1.9/basics/working-with-schemas/index.html b/gems/dry-schema/1.9/basics/working-with-schemas/index.html index 1c11efe680..bdd3ba9afa 100644 --- a/gems/dry-schema/1.9/basics/working-with-schemas/index.html +++ b/gems/dry-schema/1.9/basics/working-with-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

+});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

Schema definition best practices:

diff --git a/gems/dry-schema/1.9/basics/working-with-schemas/index.html.gz b/gems/dry-schema/1.9/basics/working-with-schemas/index.html.gz index 1990d2dcfa..5ee3ce0c7c 100644 Binary files a/gems/dry-schema/1.9/basics/working-with-schemas/index.html.gz and b/gems/dry-schema/1.9/basics/working-with-schemas/index.html.gz differ diff --git a/gems/dry-schema/1.9/error-messages/index.html b/gems/dry-schema/1.9/error-messages/index.html index 124aa4eeb7..46db5508c0 100644 --- a/gems/dry-schema/1.9/error-messages/index.html +++ b/gems/dry-schema/1.9/error-messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Error messages

By default dry-schema comes with a set of pre-defined error messages for every built-in predicate. They are defined in a yaml file which is shipped with the gem. This file is compatible with I18n format.

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

# enable :hints
 
 Dry::Schema.load_extensions(:hints)
diff --git a/gems/dry-schema/1.9/extensions/hints/index.html.gz b/gems/dry-schema/1.9/extensions/hints/index.html.gz
index 17f750cdea..62061fb7cd 100644
Binary files a/gems/dry-schema/1.9/extensions/hints/index.html.gz and b/gems/dry-schema/1.9/extensions/hints/index.html.gz differ
diff --git a/gems/dry-schema/1.9/extensions/index.html b/gems/dry-schema/1.9/extensions/index.html
index 86983106b3..cbf2c410a3 100644
--- a/gems/dry-schema/1.9/extensions/index.html
+++ b/gems/dry-schema/1.9/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-schema can be extended with extension. Those extensions are loaded with Dry::Schema.load_extensions.

Available extensions:

diff --git a/gems/dry-schema/1.9/extensions/index.html.gz b/gems/dry-schema/1.9/extensions/index.html.gz index a87af74d46..b4f9a9554b 100644 Binary files a/gems/dry-schema/1.9/extensions/index.html.gz and b/gems/dry-schema/1.9/extensions/index.html.gz differ diff --git a/gems/dry-schema/1.9/extensions/info/index.html b/gems/dry-schema/1.9/extensions/info/index.html index 227d99e078..386609a59e 100644 --- a/gems/dry-schema/1.9/extensions/info/index.html +++ b/gems/dry-schema/1.9/extensions/info/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

+});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

WARN The info data structure is not stable yet and may change before 2.0.0 depending on the user feedback. diff --git a/gems/dry-schema/1.9/extensions/info/index.html.gz b/gems/dry-schema/1.9/extensions/info/index.html.gz index 34bad95533..3e79a33e31 100644 Binary files a/gems/dry-schema/1.9/extensions/info/index.html.gz and b/gems/dry-schema/1.9/extensions/info/index.html.gz differ diff --git a/gems/dry-schema/1.9/extensions/json_schema/index.html b/gems/dry-schema/1.9/extensions/json_schema/index.html index d7054a410e..f15716f9ea 100644 --- a/gems/dry-schema/1.9/extensions/json_schema/index.html +++ b/gems/dry-schema/1.9/extensions/json_schema/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

JSON Schema

The :json_schema extension allows you to generate a valid JSON Schema from a Dry::Schema. JSON Schema is a widely used standard, so this unlocks many possibilities.

+});

JSON Schema

The :json_schema extension allows you to generate a valid JSON Schema from a Dry::Schema. JSON Schema is a widely used standard, so this unlocks many possibilities.

Dry::Schema.load_extensions(:json_schema)
 
 UserSchema = Dry::Schema.JSON do
diff --git a/gems/dry-schema/1.9/extensions/json_schema/index.html.gz b/gems/dry-schema/1.9/extensions/json_schema/index.html.gz
index 341b06afcc..a74810c085 100644
Binary files a/gems/dry-schema/1.9/extensions/json_schema/index.html.gz and b/gems/dry-schema/1.9/extensions/json_schema/index.html.gz differ
diff --git a/gems/dry-schema/1.9/extensions/monads/index.html b/gems/dry-schema/1.9/extensions/monads/index.html
index 5676638f62..ec71d6d1a1 100644
--- a/gems/dry-schema/1.9/extensions/monads/index.html
+++ b/gems/dry-schema/1.9/extensions/monads/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Monads

The monads extension makes Dry::Schema::Result objects compatible with dry-monads.

To enable the extension:

require 'dry/schema'
diff --git a/gems/dry-schema/1.9/extensions/monads/index.html.gz b/gems/dry-schema/1.9/extensions/monads/index.html.gz
index bdcf4ce4d1..c8773f0085 100644
Binary files a/gems/dry-schema/1.9/extensions/monads/index.html.gz and b/gems/dry-schema/1.9/extensions/monads/index.html.gz differ
diff --git a/gems/dry-schema/1.9/index.html b/gems/dry-schema/1.9/index.html
index eef75a70ba..10a9ddb5d1 100644
--- a/gems/dry-schema/1.9/index.html
+++ b/gems/dry-schema/1.9/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

+});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

Main focus of this library is on:

diff --git a/gems/dry-schema/1.9/index.html.gz b/gems/dry-schema/1.9/index.html.gz index bb07f78149..292fa38f94 100644 Binary files a/gems/dry-schema/1.9/index.html.gz and b/gems/dry-schema/1.9/index.html.gz differ diff --git a/gems/dry-schema/1.9/json/index.html b/gems/dry-schema/1.9/json/index.html index 2a19da730d..1a7781c37f 100644 --- a/gems/dry-schema/1.9/json/index.html +++ b/gems/dry-schema/1.9/json/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

JSON

To validate JSON data structures, you can use JSON schemas. The difference between Params and JSON is coercion logic. Refer to dry-types documentation for more information about supported JSON coercions.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

This also comes with the benefit of being explicit about the type expectation. In the example below we explicitly state that :age can be omitted or if present it must be an integer and it must be greater than 18.

Params

Probably the most common use case is to validate HTTP params. This is a special kind of a validation for a couple of reasons:

  • The input is a hash with stringified keys
  • diff --git a/gems/dry-schema/1.9/params/index.html.gz b/gems/dry-schema/1.9/params/index.html.gz index 62f7c33b93..209f686b94 100644 Binary files a/gems/dry-schema/1.9/params/index.html.gz and b/gems/dry-schema/1.9/params/index.html.gz differ diff --git a/gems/dry-schema/1.9/reusing-schemas/index.html b/gems/dry-schema/1.9/reusing-schemas/index.html index e615bfd4e5..089fb311fc 100644 --- a/gems/dry-schema/1.9/reusing-schemas/index.html +++ b/gems/dry-schema/1.9/reusing-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Reusing schemas

You can easily reuse existing schemas using nested-schema syntax:

AddressSchema = Dry::Schema.Params do
   required(:street).filled(:string)
   required(:city).filled(:string)
diff --git a/gems/dry-schema/1.9/reusing-schemas/index.html.gz b/gems/dry-schema/1.9/reusing-schemas/index.html.gz
index 981dcf042b..e9e2b5ee23 100644
Binary files a/gems/dry-schema/1.9/reusing-schemas/index.html.gz and b/gems/dry-schema/1.9/reusing-schemas/index.html.gz differ
diff --git a/gems/dry-schema/index.html.gz b/gems/dry-schema/index.html.gz
index 0ec4433426..1cfc76a127 100644
Binary files a/gems/dry-schema/index.html.gz and b/gems/dry-schema/index.html.gz differ
diff --git a/gems/dry-schema/main/advanced/composing-schemas/index.html b/gems/dry-schema/main/advanced/composing-schemas/index.html
index b79e4b6e9c..3a60359b5d 100644
--- a/gems/dry-schema/main/advanced/composing-schemas/index.html
+++ b/gems/dry-schema/main/advanced/composing-schemas/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Composing schemas

+});

Composing schemas

Warning
diff --git a/gems/dry-schema/main/advanced/composing-schemas/index.html.gz b/gems/dry-schema/main/advanced/composing-schemas/index.html.gz index 98b5dbd7e9..5c63adb285 100644 Binary files a/gems/dry-schema/main/advanced/composing-schemas/index.html.gz and b/gems/dry-schema/main/advanced/composing-schemas/index.html.gz differ diff --git a/gems/dry-schema/main/advanced/custom-predicates/index.html b/gems/dry-schema/main/advanced/custom-predicates/index.html index 238b66b925..6fadf1830a 100644 --- a/gems/dry-schema/main/advanced/custom-predicates/index.html +++ b/gems/dry-schema/main/advanced/custom-predicates/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom predicates

If you want to define custom predicates, you can create a special module that includes default ones along with your custom functions:

+});

Custom predicates

If you want to define custom predicates, you can create a special module that includes default ones along with your custom functions:

module MyPredicates
   include Dry::Logic::Predicates
 
diff --git a/gems/dry-schema/main/advanced/custom-predicates/index.html.gz b/gems/dry-schema/main/advanced/custom-predicates/index.html.gz
index 57da1d7dfd..0a59ff785d 100644
Binary files a/gems/dry-schema/main/advanced/custom-predicates/index.html.gz and b/gems/dry-schema/main/advanced/custom-predicates/index.html.gz differ
diff --git a/gems/dry-schema/main/advanced/custom-types/index.html b/gems/dry-schema/main/advanced/custom-types/index.html
index 79aa8548fa..0880e11d2f 100644
--- a/gems/dry-schema/main/advanced/custom-types/index.html
+++ b/gems/dry-schema/main/advanced/custom-types/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

+});

Custom types

You would often use dry-schema to transform your input. Let's say, you want to remove any whitespace characters at the beginning and the end of the string. You would probably make a type like this and use it in your schema:

StrippedString = Types::String.constructor(&:strip)
 
 Schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/main/advanced/custom-types/index.html.gz b/gems/dry-schema/main/advanced/custom-types/index.html.gz
index 6a3a625ae7..35cafbfdbc 100644
Binary files a/gems/dry-schema/main/advanced/custom-types/index.html.gz and b/gems/dry-schema/main/advanced/custom-types/index.html.gz differ
diff --git a/gems/dry-schema/main/advanced/filtering/index.html b/gems/dry-schema/main/advanced/filtering/index.html
index 1c24bb8e8e..9921a3b2d2 100644
--- a/gems/dry-schema/main/advanced/filtering/index.html
+++ b/gems/dry-schema/main/advanced/filtering/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

+});

Filtering

One of the unique features of dry-schema is the ability to define rules that are applied before coercion. This means you can ensure that the input has the right format for the coercion to work, or maybe you just want to restrict certain values entering your system.

Here's a common example - your system supports only one specific date format, and you want to validate that the input value has this format before trying to coerce it into a date object. In order to do that, you can use filter macro, which works just like value, but its predicates are applied before value coercion:

schema = Dry::Schema.Params do
diff --git a/gems/dry-schema/main/advanced/filtering/index.html.gz b/gems/dry-schema/main/advanced/filtering/index.html.gz
index b4007bec3a..cd731f35cc 100644
Binary files a/gems/dry-schema/main/advanced/filtering/index.html.gz and b/gems/dry-schema/main/advanced/filtering/index.html.gz differ
diff --git a/gems/dry-schema/main/advanced/index.html b/gems/dry-schema/main/advanced/index.html
index 51221dd762..251e71f09b 100644
--- a/gems/dry-schema/main/advanced/index.html
+++ b/gems/dry-schema/main/advanced/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Advanced

  • Predicate Logic
  • Composing schemas
  • Unexpected keys
  • diff --git a/gems/dry-schema/main/advanced/index.html.gz b/gems/dry-schema/main/advanced/index.html.gz index cd47ef8d71..62741a6927 100644 Binary files a/gems/dry-schema/main/advanced/index.html.gz and b/gems/dry-schema/main/advanced/index.html.gz differ diff --git a/gems/dry-schema/main/advanced/key-maps/index.html b/gems/dry-schema/main/advanced/key-maps/index.html index f91a7dcf1b..50d3fdd808 100644 --- a/gems/dry-schema/main/advanced/key-maps/index.html +++ b/gems/dry-schema/main/advanced/key-maps/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

+});

Key maps

When you define a schema, you get access to the key map which holds information about specified keys. Internally, dry-schema uses key maps to:

  • Rebuild the original input hash by rejecting unknown keys
  • diff --git a/gems/dry-schema/main/advanced/key-maps/index.html.gz b/gems/dry-schema/main/advanced/key-maps/index.html.gz index 9490ac0c6d..33f5eee4de 100644 Binary files a/gems/dry-schema/main/advanced/key-maps/index.html.gz and b/gems/dry-schema/main/advanced/key-maps/index.html.gz differ diff --git a/gems/dry-schema/main/advanced/predicate-logic/index.html b/gems/dry-schema/main/advanced/predicate-logic/index.html index 5bc9c8b3ed..a9e5a85348 100644 --- a/gems/dry-schema/main/advanced/predicate-logic/index.html +++ b/gems/dry-schema/main/advanced/predicate-logic/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

+});

Predicate logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-schema schemas have rules that are always conditional, they are executed only if defined conditions are met.

This document explains how rule composition works in terms of predicate logic.

Processor steps

+});

Processor steps

Warning
diff --git a/gems/dry-schema/main/advanced/processor-steps/index.html.gz b/gems/dry-schema/main/advanced/processor-steps/index.html.gz index 1514f2c3ee..f394fc661f 100644 Binary files a/gems/dry-schema/main/advanced/processor-steps/index.html.gz and b/gems/dry-schema/main/advanced/processor-steps/index.html.gz differ diff --git a/gems/dry-schema/main/advanced/rule-ast/index.html b/gems/dry-schema/main/advanced/rule-ast/index.html index 733297c18d..024315af97 100644 --- a/gems/dry-schema/main/advanced/rule-ast/index.html +++ b/gems/dry-schema/main/advanced/rule-ast/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Rule AST

The DSL in dry-schema is used to create rule objects that are provided by dry-logic. These rules are built using an AST, which uses simple data structures to represent predicates and how they are composed into complex rules and operations.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

+});

Unexpected keys

You can enable special key validation which will provide error messages about unexpected keys in an input. This is useful if you want to be very strict about what your system allows.

In order to use this type of validation, you need to enable it via config:

# Enable it globally
diff --git a/gems/dry-schema/main/advanced/unexpected-keys/index.html.gz b/gems/dry-schema/main/advanced/unexpected-keys/index.html.gz
index 3fccdfdb2e..ee8b495a01 100644
Binary files a/gems/dry-schema/main/advanced/unexpected-keys/index.html.gz and b/gems/dry-schema/main/advanced/unexpected-keys/index.html.gz differ
diff --git a/gems/dry-schema/main/basics/built-in-predicates/index.html b/gems/dry-schema/main/basics/built-in-predicates/index.html
index 8e709699f3..92fabc9b68 100644
--- a/gems/dry-schema/main/basics/built-in-predicates/index.html
+++ b/gems/dry-schema/main/basics/built-in-predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in predicates

The DSL supports many built-in predicates that can be used to verify validity of the input. If the predicates do not meet your requirements, you probably want to look at dry-validation which offers a more advanced way of defining validations.

+});

Basics

Here's a basic example where we validate the following things:

  • The input must have a key called :email diff --git a/gems/dry-schema/main/basics/index.html.gz b/gems/dry-schema/main/basics/index.html.gz index cebf208ee5..5bab2311cb 100644 Binary files a/gems/dry-schema/main/basics/index.html.gz and b/gems/dry-schema/main/basics/index.html.gz differ diff --git a/gems/dry-schema/main/basics/macros/index.html b/gems/dry-schema/main/basics/macros/index.html index d870cf0981..ef196381e4 100644 --- a/gems/dry-schema/main/basics/macros/index.html +++ b/gems/dry-schema/main/basics/macros/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Macros

Defining rules using blocks is very flexible and powerful; however, in most common cases repeatedly defining the same rules leads to boilerplate code. That's why dry-schema's DSL provides convenient macros to reduce that boilerplate. Every macro can be expanded to its block-based equivalent.

+});

Type specs

+});

Type specs

Warning
diff --git a/gems/dry-schema/main/basics/type-specs/index.html.gz b/gems/dry-schema/main/basics/type-specs/index.html.gz index 11ef2443c9..53d55ce5f1 100644 Binary files a/gems/dry-schema/main/basics/type-specs/index.html.gz and b/gems/dry-schema/main/basics/type-specs/index.html.gz differ diff --git a/gems/dry-schema/main/basics/working-with-schemas/index.html b/gems/dry-schema/main/basics/working-with-schemas/index.html index fe167987c3..98806d5063 100644 --- a/gems/dry-schema/main/basics/working-with-schemas/index.html +++ b/gems/dry-schema/main/basics/working-with-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

+});

Working with schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

Schema definition best practices:

diff --git a/gems/dry-schema/main/basics/working-with-schemas/index.html.gz b/gems/dry-schema/main/basics/working-with-schemas/index.html.gz index 7ce08765ec..35ca80a3f4 100644 Binary files a/gems/dry-schema/main/basics/working-with-schemas/index.html.gz and b/gems/dry-schema/main/basics/working-with-schemas/index.html.gz differ diff --git a/gems/dry-schema/main/error-messages/index.html b/gems/dry-schema/main/error-messages/index.html index b2eae2faf3..65829b617f 100644 --- a/gems/dry-schema/main/error-messages/index.html +++ b/gems/dry-schema/main/error-messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Error messages

By default dry-schema comes with a set of pre-defined error messages for every built-in predicate. They are defined in a yaml file which is shipped with the gem. This file is compatible with I18n format.

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

+});

Hints

In addition to error messages, you can also access hints, which are generated from your rules. While errors tell you which predicate checks failed, hints tell you which additional predicate checks were not evaluated because an earlier predicate failed:

# enable :hints
 
 Dry::Schema.load_extensions(:hints)
diff --git a/gems/dry-schema/main/extensions/hints/index.html.gz b/gems/dry-schema/main/extensions/hints/index.html.gz
index f4772b0cef..b07212ca2c 100644
Binary files a/gems/dry-schema/main/extensions/hints/index.html.gz and b/gems/dry-schema/main/extensions/hints/index.html.gz differ
diff --git a/gems/dry-schema/main/extensions/index.html b/gems/dry-schema/main/extensions/index.html
index 1f6108b42a..95dc977dde 100644
--- a/gems/dry-schema/main/extensions/index.html
+++ b/gems/dry-schema/main/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-schema can be extended with extension. Those extensions are loaded with Dry::Schema.load_extensions.

Available extensions:

diff --git a/gems/dry-schema/main/extensions/index.html.gz b/gems/dry-schema/main/extensions/index.html.gz index 57dcff19a2..ebea0d310f 100644 Binary files a/gems/dry-schema/main/extensions/index.html.gz and b/gems/dry-schema/main/extensions/index.html.gz differ diff --git a/gems/dry-schema/main/extensions/info/index.html b/gems/dry-schema/main/extensions/info/index.html index c3f648a18e..f7225cd8a7 100644 --- a/gems/dry-schema/main/extensions/info/index.html +++ b/gems/dry-schema/main/extensions/info/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

+});

Info

If you need to introspect your keys and types, you can enable :info extension which adds #info method to all schema types. This method returns a simple data structure that provides basic information about keys and types.

WARN The info data structure is not stable yet and may change before 2.0.0 depending on the user feedback. diff --git a/gems/dry-schema/main/extensions/info/index.html.gz b/gems/dry-schema/main/extensions/info/index.html.gz index cef8c8117b..6813cf43b5 100644 Binary files a/gems/dry-schema/main/extensions/info/index.html.gz and b/gems/dry-schema/main/extensions/info/index.html.gz differ diff --git a/gems/dry-schema/main/extensions/json_schema/index.html b/gems/dry-schema/main/extensions/json_schema/index.html index 6000af1d89..15614eba2e 100644 --- a/gems/dry-schema/main/extensions/json_schema/index.html +++ b/gems/dry-schema/main/extensions/json_schema/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

JSON Schema

The :json_schema extension allows you to generate a valid JSON Schema from a Dry::Schema. JSON Schema is a widely used standard, so this unlocks many possibilities.

+});

JSON Schema

The :json_schema extension allows you to generate a valid JSON Schema from a Dry::Schema. JSON Schema is a widely used standard, so this unlocks many possibilities.

Dry::Schema.load_extensions(:json_schema)
 
 UserSchema = Dry::Schema.JSON do
diff --git a/gems/dry-schema/main/extensions/json_schema/index.html.gz b/gems/dry-schema/main/extensions/json_schema/index.html.gz
index a0ba333a83..173b41503a 100644
Binary files a/gems/dry-schema/main/extensions/json_schema/index.html.gz and b/gems/dry-schema/main/extensions/json_schema/index.html.gz differ
diff --git a/gems/dry-schema/main/extensions/monads/index.html b/gems/dry-schema/main/extensions/monads/index.html
index fb42e22455..fd5dc70013 100644
--- a/gems/dry-schema/main/extensions/monads/index.html
+++ b/gems/dry-schema/main/extensions/monads/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Monads

The monads extension makes Dry::Schema::Result objects compatible with dry-monads.

To enable the extension:

require 'dry/schema'
diff --git a/gems/dry-schema/main/extensions/monads/index.html.gz b/gems/dry-schema/main/extensions/monads/index.html.gz
index 3e26639d47..7d360ab207 100644
Binary files a/gems/dry-schema/main/extensions/monads/index.html.gz and b/gems/dry-schema/main/extensions/monads/index.html.gz differ
diff --git a/gems/dry-schema/main/index.html b/gems/dry-schema/main/index.html
index ae656cf54f..770daa55fa 100644
--- a/gems/dry-schema/main/index.html
+++ b/gems/dry-schema/main/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

+});

Introduction

dry-schema is a validation library for data structures. It ships with a set of many built-in predicates and powerful DSL to define even complex data validations with very concise syntax.

Main focus of this library is on:

diff --git a/gems/dry-schema/main/index.html.gz b/gems/dry-schema/main/index.html.gz index 70b82f5c41..d1e0840fd5 100644 Binary files a/gems/dry-schema/main/index.html.gz and b/gems/dry-schema/main/index.html.gz differ diff --git a/gems/dry-schema/main/json/index.html b/gems/dry-schema/main/json/index.html index b97a4be97f..1628246529 100644 --- a/gems/dry-schema/main/json/index.html +++ b/gems/dry-schema/main/json/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

JSON

To validate JSON data structures, you can use JSON schemas. The difference between Params and JSON is coercion logic. Refer to dry-types documentation for more information about supported JSON coercions.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

+});

Optional keys and values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which gives you precise errors when a key is missing or key is present but the value is nil.

This also comes with the benefit of being explicit about the type expectation. In the example below we explicitly state that :age can be omitted or if present it must be an integer and it must be greater than 18.

Params

Probably the most common use case is to validate HTTP params. This is a special kind of a validation for a couple of reasons:

  • The input is a hash with stringified keys
  • diff --git a/gems/dry-schema/main/params/index.html.gz b/gems/dry-schema/main/params/index.html.gz index 81860ca8db..4b6abe6811 100644 Binary files a/gems/dry-schema/main/params/index.html.gz and b/gems/dry-schema/main/params/index.html.gz differ diff --git a/gems/dry-schema/main/reusing-schemas/index.html b/gems/dry-schema/main/reusing-schemas/index.html index c0f9836934..bdfeee1ad8 100644 --- a/gems/dry-schema/main/reusing-schemas/index.html +++ b/gems/dry-schema/main/reusing-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Reusing schemas

You can easily reuse existing schemas using nested-schema syntax:

AddressSchema = Dry::Schema.Params do
   required(:street).filled(:string)
   required(:city).filled(:string)
diff --git a/gems/dry-schema/main/reusing-schemas/index.html.gz b/gems/dry-schema/main/reusing-schemas/index.html.gz
index 10eafcc7b9..c33ed94e66 100644
Binary files a/gems/dry-schema/main/reusing-schemas/index.html.gz and b/gems/dry-schema/main/reusing-schemas/index.html.gz differ
diff --git a/gems/dry-struct/0.7/constructor-types/index.html b/gems/dry-struct/0.7/constructor-types/index.html
index f9bd337982..5b3f5da577 100644
--- a/gems/dry-struct/0.7/constructor-types/index.html
+++ b/gems/dry-struct/0.7/constructor-types/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Constructor Types (deprecated)

Constructor types were removed in v0.5.0. Use transform_types and transform_keys as a replacement.

diff --git a/gems/dry-struct/0.7/constructor-types/index.html.gz b/gems/dry-struct/0.7/constructor-types/index.html.gz index 8ba3829865..ad71e06517 100644 Binary files a/gems/dry-struct/0.7/constructor-types/index.html.gz and b/gems/dry-struct/0.7/constructor-types/index.html.gz differ diff --git a/gems/dry-struct/0.7/index.html b/gems/dry-struct/0.7/index.html index c4b7b8f6d3..726f073c06 100644 --- a/gems/dry-struct/0.7/index.html +++ b/gems/dry-struct/0.7/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-struct is a gem built on top of dry-types which provides virtus-like DSL for defining typed struct classes.

+});

Nested Structs

The DSL allows to define nested structs by passing a block to attribute:

+});

Nested Structs

The DSL allows to define nested structs by passing a block to attribute:

class User < Dry::Struct
   attribute :name, Types::Strict::String
   attribute :address do
diff --git a/gems/dry-struct/0.7/nested-structs/index.html.gz b/gems/dry-struct/0.7/nested-structs/index.html.gz
index c495876286..df5e146ee0 100644
Binary files a/gems/dry-struct/0.7/nested-structs/index.html.gz and b/gems/dry-struct/0.7/nested-structs/index.html.gz differ
diff --git a/gems/dry-struct/0.7/recipes/index.html b/gems/dry-struct/0.7/recipes/index.html
index 2125a76fd6..68cc769af9 100644
--- a/gems/dry-struct/0.7/recipes/index.html
+++ b/gems/dry-struct/0.7/recipes/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Recipes

Symbolize input keys

require 'dry-struct'
diff --git a/gems/dry-struct/0.7/recipes/index.html.gz b/gems/dry-struct/0.7/recipes/index.html.gz
index 207f542e96..dda9fcf4ce 100644
Binary files a/gems/dry-struct/0.7/recipes/index.html.gz and b/gems/dry-struct/0.7/recipes/index.html.gz differ
diff --git a/gems/dry-struct/1.0/index.html b/gems/dry-struct/1.0/index.html
index fbae27769e..52c779900f 100644
--- a/gems/dry-struct/1.0/index.html
+++ b/gems/dry-struct/1.0/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-struct is a gem built on top of dry-types which provides virtus-like DSL for defining typed struct classes.

+});

Nested Structs

The DSL allows to define nested structs by passing a block to attribute:

+});

Nested Structs

The DSL allows to define nested structs by passing a block to attribute:

class User < Dry::Struct
   attribute :name, Types::String
   attribute :address do
diff --git a/gems/dry-struct/1.0/nested-structs/index.html.gz b/gems/dry-struct/1.0/nested-structs/index.html.gz
index ea2511686a..797f50230e 100644
Binary files a/gems/dry-struct/1.0/nested-structs/index.html.gz and b/gems/dry-struct/1.0/nested-structs/index.html.gz differ
diff --git a/gems/dry-struct/1.0/recipes/index.html b/gems/dry-struct/1.0/recipes/index.html
index 0bb291dc92..f5511dd48c 100644
--- a/gems/dry-struct/1.0/recipes/index.html
+++ b/gems/dry-struct/1.0/recipes/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Recipes

Symbolize input keys

require 'dry-struct'
diff --git a/gems/dry-struct/1.0/recipes/index.html.gz b/gems/dry-struct/1.0/recipes/index.html.gz
index be1d0c696d..317feb503c 100644
Binary files a/gems/dry-struct/1.0/recipes/index.html.gz and b/gems/dry-struct/1.0/recipes/index.html.gz differ
diff --git a/gems/dry-struct/1.1/index.html b/gems/dry-struct/1.1/index.html
index 40905a26f9..cbc61c6c51 100644
--- a/gems/dry-struct/1.1/index.html
+++ b/gems/dry-struct/1.1/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-struct is a gem built on top of dry-types which provides virtus-like DSL for defining typed struct classes.

+});

Nested Structs

The DSL allows to define nested structs by passing a block to attribute:

+});

Nested Structs

The DSL allows to define nested structs by passing a block to attribute:

class User < Dry::Struct
   attribute :name, Types::String
   attribute :address do
diff --git a/gems/dry-struct/1.1/nested-structs/index.html.gz b/gems/dry-struct/1.1/nested-structs/index.html.gz
index 56761b1428..cae11e1dc1 100644
Binary files a/gems/dry-struct/1.1/nested-structs/index.html.gz and b/gems/dry-struct/1.1/nested-structs/index.html.gz differ
diff --git a/gems/dry-struct/1.1/recipes/index.html b/gems/dry-struct/1.1/recipes/index.html
index c757448087..e1e20d35af 100644
--- a/gems/dry-struct/1.1/recipes/index.html
+++ b/gems/dry-struct/1.1/recipes/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Recipes

Symbolize input keys

require 'dry-struct'
diff --git a/gems/dry-struct/1.1/recipes/index.html.gz b/gems/dry-struct/1.1/recipes/index.html.gz
index 59a1d5c7e3..8ffd21f4b5 100644
Binary files a/gems/dry-struct/1.1/recipes/index.html.gz and b/gems/dry-struct/1.1/recipes/index.html.gz differ
diff --git a/gems/dry-struct/1.2/index.html b/gems/dry-struct/1.2/index.html
index 95a1e4ca1a..62b78880b2 100644
--- a/gems/dry-struct/1.2/index.html
+++ b/gems/dry-struct/1.2/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-struct is a gem built on top of dry-types which provides virtus-like DSL for defining typed struct classes.

+});

Nested Structs

The DSL allows to define nested structs by passing a block to attribute:

+});

Nested Structs

The DSL allows to define nested structs by passing a block to attribute:

class User < Dry::Struct
   attribute :name, Types::String
   attribute :address do
diff --git a/gems/dry-struct/1.2/nested-structs/index.html.gz b/gems/dry-struct/1.2/nested-structs/index.html.gz
index 38b543ce72..ead4c83774 100644
Binary files a/gems/dry-struct/1.2/nested-structs/index.html.gz and b/gems/dry-struct/1.2/nested-structs/index.html.gz differ
diff --git a/gems/dry-struct/1.2/recipes/index.html b/gems/dry-struct/1.2/recipes/index.html
index a1d2901144..21108f4423 100644
--- a/gems/dry-struct/1.2/recipes/index.html
+++ b/gems/dry-struct/1.2/recipes/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Recipes

Symbolize input keys

require 'dry-struct'
diff --git a/gems/dry-struct/1.2/recipes/index.html.gz b/gems/dry-struct/1.2/recipes/index.html.gz
index f2c289c2af..10f51c07f7 100644
Binary files a/gems/dry-struct/1.2/recipes/index.html.gz and b/gems/dry-struct/1.2/recipes/index.html.gz differ
diff --git a/gems/dry-struct/1.3/index.html b/gems/dry-struct/1.3/index.html
index 0193300d4a..ed0273759d 100644
--- a/gems/dry-struct/1.3/index.html
+++ b/gems/dry-struct/1.3/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-struct is a gem built on top of dry-types which provides virtus-like DSL for defining typed struct classes.

+});

Nested Structs

The DSL allows to define nested structs by passing a block to attribute:

+});

Nested Structs

The DSL allows to define nested structs by passing a block to attribute:

class User < Dry::Struct
   attribute :name, Types::String
   attribute :address do
diff --git a/gems/dry-struct/1.3/nested-structs/index.html.gz b/gems/dry-struct/1.3/nested-structs/index.html.gz
index 4a6aa74dfb..7ca95e7490 100644
Binary files a/gems/dry-struct/1.3/nested-structs/index.html.gz and b/gems/dry-struct/1.3/nested-structs/index.html.gz differ
diff --git a/gems/dry-struct/1.3/recipes/index.html b/gems/dry-struct/1.3/recipes/index.html
index 86e16139ee..f5326a0eb1 100644
--- a/gems/dry-struct/1.3/recipes/index.html
+++ b/gems/dry-struct/1.3/recipes/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Recipes

Symbolize input keys

require 'dry-struct'
diff --git a/gems/dry-struct/1.3/recipes/index.html.gz b/gems/dry-struct/1.3/recipes/index.html.gz
index 7672a83afa..7c183835da 100644
Binary files a/gems/dry-struct/1.3/recipes/index.html.gz and b/gems/dry-struct/1.3/recipes/index.html.gz differ
diff --git a/gems/dry-struct/1.4/index.html b/gems/dry-struct/1.4/index.html
index e66cd2b1f5..82f336cf0f 100644
--- a/gems/dry-struct/1.4/index.html
+++ b/gems/dry-struct/1.4/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-struct is a gem built on top of dry-types which provides virtus-like DSL for defining typed struct classes.

+});

Nested Structs

The DSL allows to define nested structs by passing a block to attribute:

+});

Nested Structs

The DSL allows to define nested structs by passing a block to attribute:

class User < Dry::Struct
   attribute :name, Types::String
   attribute :address do
diff --git a/gems/dry-struct/1.4/nested-structs/index.html.gz b/gems/dry-struct/1.4/nested-structs/index.html.gz
index 13c5d0cfce..720a4dbee0 100644
Binary files a/gems/dry-struct/1.4/nested-structs/index.html.gz and b/gems/dry-struct/1.4/nested-structs/index.html.gz differ
diff --git a/gems/dry-struct/1.4/recipes/index.html b/gems/dry-struct/1.4/recipes/index.html
index b7cc782fb2..280a7adfd4 100644
--- a/gems/dry-struct/1.4/recipes/index.html
+++ b/gems/dry-struct/1.4/recipes/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Recipes

Symbolize input keys

require 'dry-struct'
diff --git a/gems/dry-struct/1.4/recipes/index.html.gz b/gems/dry-struct/1.4/recipes/index.html.gz
index 4348a2765a..a1fff1ca29 100644
Binary files a/gems/dry-struct/1.4/recipes/index.html.gz and b/gems/dry-struct/1.4/recipes/index.html.gz differ
diff --git a/gems/dry-struct/1.5/index.html b/gems/dry-struct/1.5/index.html
index 3a07599f0d..d8024384d1 100644
--- a/gems/dry-struct/1.5/index.html
+++ b/gems/dry-struct/1.5/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-struct is a gem built on top of dry-types which provides virtus-like DSL for defining typed struct classes.

+});

Nested Structs

The DSL allows to define nested structs by passing a block to attribute:

+});

Nested Structs

The DSL allows to define nested structs by passing a block to attribute:

class User < Dry::Struct
   attribute :name, Types::String
   attribute :address do
diff --git a/gems/dry-struct/1.5/nested-structs/index.html.gz b/gems/dry-struct/1.5/nested-structs/index.html.gz
index 7caa49c1f0..c97b422dc4 100644
Binary files a/gems/dry-struct/1.5/nested-structs/index.html.gz and b/gems/dry-struct/1.5/nested-structs/index.html.gz differ
diff --git a/gems/dry-struct/1.5/recipes/index.html b/gems/dry-struct/1.5/recipes/index.html
index f7ad62c7e4..cb8bd7d573 100644
--- a/gems/dry-struct/1.5/recipes/index.html
+++ b/gems/dry-struct/1.5/recipes/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Recipes

Symbolize input keys

require 'dry-struct'
diff --git a/gems/dry-struct/1.5/recipes/index.html.gz b/gems/dry-struct/1.5/recipes/index.html.gz
index f7399306e2..3e4c084db7 100644
Binary files a/gems/dry-struct/1.5/recipes/index.html.gz and b/gems/dry-struct/1.5/recipes/index.html.gz differ
diff --git a/gems/dry-struct/1.6/index.html b/gems/dry-struct/1.6/index.html
index e30044a2a3..d6a7f7d838 100644
--- a/gems/dry-struct/1.6/index.html
+++ b/gems/dry-struct/1.6/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-struct is a gem built on top of dry-types which provides virtus-like DSL for defining typed struct classes.

+});

Nested Structs

The DSL allows to define nested structs by passing a block to attribute:

+});

Nested Structs

The DSL allows to define nested structs by passing a block to attribute:

class User < Dry::Struct
   attribute :name, Types::String
   attribute :address do
diff --git a/gems/dry-struct/1.6/nested-structs/index.html.gz b/gems/dry-struct/1.6/nested-structs/index.html.gz
index fac17517b8..662178bc5b 100644
Binary files a/gems/dry-struct/1.6/nested-structs/index.html.gz and b/gems/dry-struct/1.6/nested-structs/index.html.gz differ
diff --git a/gems/dry-struct/1.6/recipes/index.html b/gems/dry-struct/1.6/recipes/index.html
index 3076feb90f..b44ca42704 100644
--- a/gems/dry-struct/1.6/recipes/index.html
+++ b/gems/dry-struct/1.6/recipes/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Recipes

Symbolize input keys

require 'dry-struct'
diff --git a/gems/dry-struct/1.6/recipes/index.html.gz b/gems/dry-struct/1.6/recipes/index.html.gz
index cc798ba222..28b1fb5780 100644
Binary files a/gems/dry-struct/1.6/recipes/index.html.gz and b/gems/dry-struct/1.6/recipes/index.html.gz differ
diff --git a/gems/dry-struct/index.html.gz b/gems/dry-struct/index.html.gz
index 364b2849b8..3d7042057d 100644
Binary files a/gems/dry-struct/index.html.gz and b/gems/dry-struct/index.html.gz differ
diff --git a/gems/dry-struct/main/index.html b/gems/dry-struct/main/index.html
index 2f4c41d4d2..0dbd4a0459 100644
--- a/gems/dry-struct/main/index.html
+++ b/gems/dry-struct/main/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-struct is a gem built on top of dry-types which provides virtus-like DSL for defining typed struct classes.

+});

Nested Structs

The DSL allows to define nested structs by passing a block to attribute:

+});

Nested Structs

The DSL allows to define nested structs by passing a block to attribute:

class User < Dry::Struct
   attribute :name, Types::String
   attribute :address do
diff --git a/gems/dry-struct/main/nested-structs/index.html.gz b/gems/dry-struct/main/nested-structs/index.html.gz
index 37bf176964..ee0c321488 100644
Binary files a/gems/dry-struct/main/nested-structs/index.html.gz and b/gems/dry-struct/main/nested-structs/index.html.gz differ
diff --git a/gems/dry-struct/main/recipes/index.html b/gems/dry-struct/main/recipes/index.html
index 6064e74a91..40ffb58b59 100644
--- a/gems/dry-struct/main/recipes/index.html
+++ b/gems/dry-struct/main/recipes/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Recipes

Symbolize input keys

require 'dry-struct'
diff --git a/gems/dry-struct/main/recipes/index.html.gz b/gems/dry-struct/main/recipes/index.html.gz
index 9c9be56a11..04b724287e 100644
Binary files a/gems/dry-struct/main/recipes/index.html.gz and b/gems/dry-struct/main/recipes/index.html.gz differ
diff --git a/gems/dry-system/0.1/auto-import/index.html b/gems/dry-system/0.1/auto-import/index.html
index 3b280f239c..6b824e127e 100644
--- a/gems/dry-system/0.1/auto-import/index.html
+++ b/gems/dry-system/0.1/auto-import/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

+});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

Let's say we have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/0.1/auto-import/index.html.gz b/gems/dry-system/0.1/auto-import/index.html.gz
index bb9d9bcfdc..8e71c35a3c 100644
Binary files a/gems/dry-system/0.1/auto-import/index.html.gz and b/gems/dry-system/0.1/auto-import/index.html.gz differ
diff --git a/gems/dry-system/0.1/booting/index.html b/gems/dry-system/0.1/booting/index.html
index 69e5049c1d..d74edcf309 100644
--- a/gems/dry-system/0.1/booting/index.html
+++ b/gems/dry-system/0.1/booting/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

+});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

Because of this reason dry-system has the concept of booting a dependency.

diff --git a/gems/dry-system/0.1/booting/index.html.gz b/gems/dry-system/0.1/booting/index.html.gz index 1350a5aedb..7dadf13eed 100644 Binary files a/gems/dry-system/0.1/booting/index.html.gz and b/gems/dry-system/0.1/booting/index.html.gz differ diff --git a/gems/dry-system/0.1/component-providers/index.html b/gems/dry-system/0.1/component-providers/index.html index 693bc677e5..374bbe53a5 100644 --- a/gems/dry-system/0.1/component-providers/index.html +++ b/gems/dry-system/0.1/component-providers/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

+});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

Bootable components are handled by component providers, which can register themselves and set up their components. Let's say we want to provide a common exception notifier for many applications. First, we register our provider called :common:

# my_gem
diff --git a/gems/dry-system/0.1/component-providers/index.html.gz b/gems/dry-system/0.1/component-providers/index.html.gz
index fab4eecbf7..5809def1ff 100644
Binary files a/gems/dry-system/0.1/component-providers/index.html.gz and b/gems/dry-system/0.1/component-providers/index.html.gz differ
diff --git a/gems/dry-system/0.1/container/index.html b/gems/dry-system/0.1/container/index.html
index 179fb2d675..2cb9b2a181 100644
--- a/gems/dry-system/0.1/container/index.html
+++ b/gems/dry-system/0.1/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system/container'
diff --git a/gems/dry-system/0.1/container/index.html.gz b/gems/dry-system/0.1/container/index.html.gz
index b33339de8e..5ab8a1d2a5 100644
Binary files a/gems/dry-system/0.1/container/index.html.gz and b/gems/dry-system/0.1/container/index.html.gz differ
diff --git a/gems/dry-system/0.1/index.html b/gems/dry-system/0.1/index.html
index 6333c9fe98..8484c8a875 100644
--- a/gems/dry-system/0.1/index.html
+++ b/gems/dry-system/0.1/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/0.1/index.html.gz b/gems/dry-system/0.1/index.html.gz index 14773e8661..ac2cba2759 100644 Binary files a/gems/dry-system/0.1/index.html.gz and b/gems/dry-system/0.1/index.html.gz differ diff --git a/gems/dry-system/0.1/plugins/index.html b/gems/dry-system/0.1/plugins/index.html index 4f12a72f06..4f6e92b1e3 100644 --- a/gems/dry-system/0.1/plugins/index.html +++ b/gems/dry-system/0.1/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

Dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Settings

Basic usage

diff --git a/gems/dry-system/0.1/settings/index.html.gz b/gems/dry-system/0.1/settings/index.html.gz index 04fd3c8a61..3b5e46bbc7 100644 Binary files a/gems/dry-system/0.1/settings/index.html.gz and b/gems/dry-system/0.1/settings/index.html.gz differ diff --git a/gems/dry-system/0.1/test-mode/index.html b/gems/dry-system/0.1/test-mode/index.html index 4753665415..a96a9775a0 100644 --- a/gems/dry-system/0.1/test-mode/index.html +++ b/gems/dry-system/0.1/test-mode/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system/container'
 
diff --git a/gems/dry-system/0.1/test-mode/index.html.gz b/gems/dry-system/0.1/test-mode/index.html.gz
index 40870bbd66..fd9713aa14 100644
Binary files a/gems/dry-system/0.1/test-mode/index.html.gz and b/gems/dry-system/0.1/test-mode/index.html.gz differ
diff --git a/gems/dry-system/0.12/auto-import/index.html b/gems/dry-system/0.12/auto-import/index.html
index 2f22088b01..d620e6af51 100644
--- a/gems/dry-system/0.12/auto-import/index.html
+++ b/gems/dry-system/0.12/auto-import/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

+});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

Let's say we have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/0.12/auto-import/index.html.gz b/gems/dry-system/0.12/auto-import/index.html.gz
index 193b8c26ef..69ee65b917 100644
Binary files a/gems/dry-system/0.12/auto-import/index.html.gz and b/gems/dry-system/0.12/auto-import/index.html.gz differ
diff --git a/gems/dry-system/0.12/booting/index.html b/gems/dry-system/0.12/booting/index.html
index eda121f074..d2662890fb 100644
--- a/gems/dry-system/0.12/booting/index.html
+++ b/gems/dry-system/0.12/booting/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

+});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

Because of this reason dry-system has the concept of booting a dependency.

diff --git a/gems/dry-system/0.12/booting/index.html.gz b/gems/dry-system/0.12/booting/index.html.gz index e246c42003..87b3f7ab0f 100644 Binary files a/gems/dry-system/0.12/booting/index.html.gz and b/gems/dry-system/0.12/booting/index.html.gz differ diff --git a/gems/dry-system/0.12/component-providers/index.html b/gems/dry-system/0.12/component-providers/index.html index a9b7561aef..1b9dad5dc0 100644 --- a/gems/dry-system/0.12/component-providers/index.html +++ b/gems/dry-system/0.12/component-providers/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

+});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

Bootable components are handled by component providers, which can register themselves and set up their components. Let's say we want to provide a common exception notifier for many applications. First, we register our provider called :common:

# my_gem
diff --git a/gems/dry-system/0.12/component-providers/index.html.gz b/gems/dry-system/0.12/component-providers/index.html.gz
index 25c9441afb..dc014f306d 100644
Binary files a/gems/dry-system/0.12/component-providers/index.html.gz and b/gems/dry-system/0.12/component-providers/index.html.gz differ
diff --git a/gems/dry-system/0.12/container/index.html b/gems/dry-system/0.12/container/index.html
index a913cc8555..59b5c9d194 100644
--- a/gems/dry-system/0.12/container/index.html
+++ b/gems/dry-system/0.12/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

Main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

Main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system/container'
diff --git a/gems/dry-system/0.12/container/index.html.gz b/gems/dry-system/0.12/container/index.html.gz
index b82d38e5f1..2d05d599b6 100644
Binary files a/gems/dry-system/0.12/container/index.html.gz and b/gems/dry-system/0.12/container/index.html.gz differ
diff --git a/gems/dry-system/0.12/index.html b/gems/dry-system/0.12/index.html
index 89187cd0ef..3fb42fbd11 100644
--- a/gems/dry-system/0.12/index.html
+++ b/gems/dry-system/0.12/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/0.12/index.html.gz b/gems/dry-system/0.12/index.html.gz index 38ee451df2..0fd7224ec1 100644 Binary files a/gems/dry-system/0.12/index.html.gz and b/gems/dry-system/0.12/index.html.gz differ diff --git a/gems/dry-system/0.12/plugins/index.html b/gems/dry-system/0.12/plugins/index.html index e8727b1448..18d3338336 100644 --- a/gems/dry-system/0.12/plugins/index.html +++ b/gems/dry-system/0.12/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

Dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system/container'
 
diff --git a/gems/dry-system/0.12/test-mode/index.html.gz b/gems/dry-system/0.12/test-mode/index.html.gz
index 573275ad23..11b4f1b2f2 100644
Binary files a/gems/dry-system/0.12/test-mode/index.html.gz and b/gems/dry-system/0.12/test-mode/index.html.gz differ
diff --git a/gems/dry-system/0.14/auto-import/index.html b/gems/dry-system/0.14/auto-import/index.html
index 927aa7e49d..a85798e0b8 100644
--- a/gems/dry-system/0.14/auto-import/index.html
+++ b/gems/dry-system/0.14/auto-import/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

+});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

Let's say we have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/0.14/auto-import/index.html.gz b/gems/dry-system/0.14/auto-import/index.html.gz
index a8d31e539d..4d44cb28b1 100644
Binary files a/gems/dry-system/0.14/auto-import/index.html.gz and b/gems/dry-system/0.14/auto-import/index.html.gz differ
diff --git a/gems/dry-system/0.14/booting/index.html b/gems/dry-system/0.14/booting/index.html
index 5e26bb9a58..169c271230 100644
--- a/gems/dry-system/0.14/booting/index.html
+++ b/gems/dry-system/0.14/booting/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

+});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

Because of this reason dry-system has the concept of booting a dependency.

diff --git a/gems/dry-system/0.14/booting/index.html.gz b/gems/dry-system/0.14/booting/index.html.gz index 89a5185cfe..7249dd2c2a 100644 Binary files a/gems/dry-system/0.14/booting/index.html.gz and b/gems/dry-system/0.14/booting/index.html.gz differ diff --git a/gems/dry-system/0.14/component-providers/index.html b/gems/dry-system/0.14/component-providers/index.html index 22a855939e..ee6119409b 100644 --- a/gems/dry-system/0.14/component-providers/index.html +++ b/gems/dry-system/0.14/component-providers/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

+});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

Bootable components are handled by component providers, which can register themselves and set up their components. Let's say we want to provide a common exception notifier for many applications. First, we register our provider called :common:

# my_gem
diff --git a/gems/dry-system/0.14/component-providers/index.html.gz b/gems/dry-system/0.14/component-providers/index.html.gz
index 8c36306abb..da28cbf8ad 100644
Binary files a/gems/dry-system/0.14/component-providers/index.html.gz and b/gems/dry-system/0.14/component-providers/index.html.gz differ
diff --git a/gems/dry-system/0.14/container/index.html b/gems/dry-system/0.14/container/index.html
index fdb94723af..a76ad827fd 100644
--- a/gems/dry-system/0.14/container/index.html
+++ b/gems/dry-system/0.14/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

Main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

Main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system/container'
diff --git a/gems/dry-system/0.14/container/index.html.gz b/gems/dry-system/0.14/container/index.html.gz
index 150fcc261e..26cb641155 100644
Binary files a/gems/dry-system/0.14/container/index.html.gz and b/gems/dry-system/0.14/container/index.html.gz differ
diff --git a/gems/dry-system/0.14/index.html b/gems/dry-system/0.14/index.html
index 5c26b15dd6..f4be4106bd 100644
--- a/gems/dry-system/0.14/index.html
+++ b/gems/dry-system/0.14/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/0.14/index.html.gz b/gems/dry-system/0.14/index.html.gz index f0f1b8aa41..970225a567 100644 Binary files a/gems/dry-system/0.14/index.html.gz and b/gems/dry-system/0.14/index.html.gz differ diff --git a/gems/dry-system/0.14/plugins/index.html b/gems/dry-system/0.14/plugins/index.html index 5daf6b3f1c..1825606185 100644 --- a/gems/dry-system/0.14/plugins/index.html +++ b/gems/dry-system/0.14/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

Dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system/container'
 
diff --git a/gems/dry-system/0.14/test-mode/index.html.gz b/gems/dry-system/0.14/test-mode/index.html.gz
index fb8c1722e6..f262e80839 100644
Binary files a/gems/dry-system/0.14/test-mode/index.html.gz and b/gems/dry-system/0.14/test-mode/index.html.gz differ
diff --git a/gems/dry-system/0.15/auto-import/index.html b/gems/dry-system/0.15/auto-import/index.html
index 6a208d80f3..e593a5595c 100644
--- a/gems/dry-system/0.15/auto-import/index.html
+++ b/gems/dry-system/0.15/auto-import/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

+});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

Let's say we have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/0.15/auto-import/index.html.gz b/gems/dry-system/0.15/auto-import/index.html.gz
index dec4c875f6..b598f357ab 100644
Binary files a/gems/dry-system/0.15/auto-import/index.html.gz and b/gems/dry-system/0.15/auto-import/index.html.gz differ
diff --git a/gems/dry-system/0.15/booting/index.html b/gems/dry-system/0.15/booting/index.html
index 16abd44a60..074c4cfde8 100644
--- a/gems/dry-system/0.15/booting/index.html
+++ b/gems/dry-system/0.15/booting/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

+});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

Because of this reason dry-system has the concept of booting a dependency.

diff --git a/gems/dry-system/0.15/booting/index.html.gz b/gems/dry-system/0.15/booting/index.html.gz index 04d317484a..2284f20410 100644 Binary files a/gems/dry-system/0.15/booting/index.html.gz and b/gems/dry-system/0.15/booting/index.html.gz differ diff --git a/gems/dry-system/0.15/component-providers/index.html b/gems/dry-system/0.15/component-providers/index.html index ef2c316ef3..82e65b4ee5 100644 --- a/gems/dry-system/0.15/component-providers/index.html +++ b/gems/dry-system/0.15/component-providers/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

+});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

Bootable components are handled by component providers, which can register themselves and set up their components. Let's say we want to provide a common exception notifier for many applications. First, we register our provider called :common:

# my_gem
diff --git a/gems/dry-system/0.15/component-providers/index.html.gz b/gems/dry-system/0.15/component-providers/index.html.gz
index 22552e2877..8565c23167 100644
Binary files a/gems/dry-system/0.15/component-providers/index.html.gz and b/gems/dry-system/0.15/component-providers/index.html.gz differ
diff --git a/gems/dry-system/0.15/container/index.html b/gems/dry-system/0.15/container/index.html
index aa46d05bca..7f521c7f48 100644
--- a/gems/dry-system/0.15/container/index.html
+++ b/gems/dry-system/0.15/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

Main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

Main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system/container'
diff --git a/gems/dry-system/0.15/container/index.html.gz b/gems/dry-system/0.15/container/index.html.gz
index 9f32346894..4d54897a1c 100644
Binary files a/gems/dry-system/0.15/container/index.html.gz and b/gems/dry-system/0.15/container/index.html.gz differ
diff --git a/gems/dry-system/0.15/index.html b/gems/dry-system/0.15/index.html
index 98606a26f8..a04e268bfb 100644
--- a/gems/dry-system/0.15/index.html
+++ b/gems/dry-system/0.15/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/0.15/index.html.gz b/gems/dry-system/0.15/index.html.gz index 8b0102d417..de663133cf 100644 Binary files a/gems/dry-system/0.15/index.html.gz and b/gems/dry-system/0.15/index.html.gz differ diff --git a/gems/dry-system/0.15/plugins/index.html b/gems/dry-system/0.15/plugins/index.html index 89a57d9690..8f8ffa285f 100644 --- a/gems/dry-system/0.15/plugins/index.html +++ b/gems/dry-system/0.15/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

Dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system/container'
 
diff --git a/gems/dry-system/0.15/test-mode/index.html.gz b/gems/dry-system/0.15/test-mode/index.html.gz
index bc7710b8d4..75760e8121 100644
Binary files a/gems/dry-system/0.15/test-mode/index.html.gz and b/gems/dry-system/0.15/test-mode/index.html.gz differ
diff --git a/gems/dry-system/0.16/auto-import/index.html b/gems/dry-system/0.16/auto-import/index.html
index 4d3ca67ea1..6ad0f3137d 100644
--- a/gems/dry-system/0.16/auto-import/index.html
+++ b/gems/dry-system/0.16/auto-import/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

+});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

Let's say we have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/0.16/auto-import/index.html.gz b/gems/dry-system/0.16/auto-import/index.html.gz
index 0c35da6f21..ee64a2245f 100644
Binary files a/gems/dry-system/0.16/auto-import/index.html.gz and b/gems/dry-system/0.16/auto-import/index.html.gz differ
diff --git a/gems/dry-system/0.16/booting/index.html b/gems/dry-system/0.16/booting/index.html
index cbaac056d6..d00db69857 100644
--- a/gems/dry-system/0.16/booting/index.html
+++ b/gems/dry-system/0.16/booting/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

+});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

Because of this reason dry-system has the concept of booting a dependency.

diff --git a/gems/dry-system/0.16/booting/index.html.gz b/gems/dry-system/0.16/booting/index.html.gz index 4a20734eb1..ab191545ed 100644 Binary files a/gems/dry-system/0.16/booting/index.html.gz and b/gems/dry-system/0.16/booting/index.html.gz differ diff --git a/gems/dry-system/0.16/component-providers/index.html b/gems/dry-system/0.16/component-providers/index.html index ec5488ce74..c05aee031a 100644 --- a/gems/dry-system/0.16/component-providers/index.html +++ b/gems/dry-system/0.16/component-providers/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

+});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

Bootable components are handled by component providers, which can register themselves and set up their components. Let's say we want to provide a common exception notifier for many applications. First, we register our provider called :common:

# my_gem
diff --git a/gems/dry-system/0.16/component-providers/index.html.gz b/gems/dry-system/0.16/component-providers/index.html.gz
index 9ae5b458e4..766b97b320 100644
Binary files a/gems/dry-system/0.16/component-providers/index.html.gz and b/gems/dry-system/0.16/component-providers/index.html.gz differ
diff --git a/gems/dry-system/0.16/container/index.html b/gems/dry-system/0.16/container/index.html
index 0f264a907a..f318619d5b 100644
--- a/gems/dry-system/0.16/container/index.html
+++ b/gems/dry-system/0.16/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

Main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

Main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system/container'
diff --git a/gems/dry-system/0.16/container/index.html.gz b/gems/dry-system/0.16/container/index.html.gz
index 58fa04a285..85152d9079 100644
Binary files a/gems/dry-system/0.16/container/index.html.gz and b/gems/dry-system/0.16/container/index.html.gz differ
diff --git a/gems/dry-system/0.16/index.html b/gems/dry-system/0.16/index.html
index 6b0330aefa..ebb7ddfe3b 100644
--- a/gems/dry-system/0.16/index.html
+++ b/gems/dry-system/0.16/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/0.16/index.html.gz b/gems/dry-system/0.16/index.html.gz index 21d41c331d..ceec3704dd 100644 Binary files a/gems/dry-system/0.16/index.html.gz and b/gems/dry-system/0.16/index.html.gz differ diff --git a/gems/dry-system/0.16/plugins/index.html b/gems/dry-system/0.16/plugins/index.html index d904b7575b..d4148cde35 100644 --- a/gems/dry-system/0.16/plugins/index.html +++ b/gems/dry-system/0.16/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

Dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system/container'
 
diff --git a/gems/dry-system/0.16/test-mode/index.html.gz b/gems/dry-system/0.16/test-mode/index.html.gz
index c5ab2d8924..4c63b10065 100644
Binary files a/gems/dry-system/0.16/test-mode/index.html.gz and b/gems/dry-system/0.16/test-mode/index.html.gz differ
diff --git a/gems/dry-system/0.17/auto-import/index.html b/gems/dry-system/0.17/auto-import/index.html
index e6f621eec2..7058d7267a 100644
--- a/gems/dry-system/0.17/auto-import/index.html
+++ b/gems/dry-system/0.17/auto-import/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

+});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

Let's say we have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/0.17/auto-import/index.html.gz b/gems/dry-system/0.17/auto-import/index.html.gz
index 4f544e1a96..b5dbf9f389 100644
Binary files a/gems/dry-system/0.17/auto-import/index.html.gz and b/gems/dry-system/0.17/auto-import/index.html.gz differ
diff --git a/gems/dry-system/0.17/booting/index.html b/gems/dry-system/0.17/booting/index.html
index e09464545a..3c67b56ed4 100644
--- a/gems/dry-system/0.17/booting/index.html
+++ b/gems/dry-system/0.17/booting/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

+});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

Because of this reason dry-system has the concept of booting a dependency.

diff --git a/gems/dry-system/0.17/booting/index.html.gz b/gems/dry-system/0.17/booting/index.html.gz index 8ba3463378..315eb27970 100644 Binary files a/gems/dry-system/0.17/booting/index.html.gz and b/gems/dry-system/0.17/booting/index.html.gz differ diff --git a/gems/dry-system/0.17/component-providers/index.html b/gems/dry-system/0.17/component-providers/index.html index 8376ff5fd3..2b771b6486 100644 --- a/gems/dry-system/0.17/component-providers/index.html +++ b/gems/dry-system/0.17/component-providers/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

+});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

Bootable components are handled by component providers, which can register themselves and set up their components. Let's say we want to provide a common exception notifier for many applications. First, we register our provider called :common:

# my_gem
diff --git a/gems/dry-system/0.17/component-providers/index.html.gz b/gems/dry-system/0.17/component-providers/index.html.gz
index 681d4864a3..e923566551 100644
Binary files a/gems/dry-system/0.17/component-providers/index.html.gz and b/gems/dry-system/0.17/component-providers/index.html.gz differ
diff --git a/gems/dry-system/0.17/container/index.html b/gems/dry-system/0.17/container/index.html
index 2911ab3ef0..aefec25569 100644
--- a/gems/dry-system/0.17/container/index.html
+++ b/gems/dry-system/0.17/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

Main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

Main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system/container'
diff --git a/gems/dry-system/0.17/container/index.html.gz b/gems/dry-system/0.17/container/index.html.gz
index 1355947d85..4a3442c788 100644
Binary files a/gems/dry-system/0.17/container/index.html.gz and b/gems/dry-system/0.17/container/index.html.gz differ
diff --git a/gems/dry-system/0.17/index.html b/gems/dry-system/0.17/index.html
index 3c938805b8..f5f74bab32 100644
--- a/gems/dry-system/0.17/index.html
+++ b/gems/dry-system/0.17/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/0.17/index.html.gz b/gems/dry-system/0.17/index.html.gz index 442203e6bb..6003201602 100644 Binary files a/gems/dry-system/0.17/index.html.gz and b/gems/dry-system/0.17/index.html.gz differ diff --git a/gems/dry-system/0.17/plugins/index.html b/gems/dry-system/0.17/plugins/index.html index ce5ae7607c..f237ad3e75 100644 --- a/gems/dry-system/0.17/plugins/index.html +++ b/gems/dry-system/0.17/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

Dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Settings

Basic usage

diff --git a/gems/dry-system/0.17/settings/index.html.gz b/gems/dry-system/0.17/settings/index.html.gz index b0ff124ed1..fba320d1ff 100644 Binary files a/gems/dry-system/0.17/settings/index.html.gz and b/gems/dry-system/0.17/settings/index.html.gz differ diff --git a/gems/dry-system/0.17/test-mode/index.html b/gems/dry-system/0.17/test-mode/index.html index f6f8c32fb1..070a573161 100644 --- a/gems/dry-system/0.17/test-mode/index.html +++ b/gems/dry-system/0.17/test-mode/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system/container'
 
diff --git a/gems/dry-system/0.17/test-mode/index.html.gz b/gems/dry-system/0.17/test-mode/index.html.gz
index b0c28a6e90..c0a36ef367 100644
Binary files a/gems/dry-system/0.17/test-mode/index.html.gz and b/gems/dry-system/0.17/test-mode/index.html.gz differ
diff --git a/gems/dry-system/0.18/auto-import/index.html b/gems/dry-system/0.18/auto-import/index.html
index eca93371a6..d61dd1b9f3 100644
--- a/gems/dry-system/0.18/auto-import/index.html
+++ b/gems/dry-system/0.18/auto-import/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

+});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

Let's say we have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/0.18/auto-import/index.html.gz b/gems/dry-system/0.18/auto-import/index.html.gz
index 82bc382a1b..9ea561172b 100644
Binary files a/gems/dry-system/0.18/auto-import/index.html.gz and b/gems/dry-system/0.18/auto-import/index.html.gz differ
diff --git a/gems/dry-system/0.18/booting/index.html b/gems/dry-system/0.18/booting/index.html
index 0074309343..8823fb6978 100644
--- a/gems/dry-system/0.18/booting/index.html
+++ b/gems/dry-system/0.18/booting/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

+});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

Because of this reason dry-system has the concept of booting a dependency.

diff --git a/gems/dry-system/0.18/booting/index.html.gz b/gems/dry-system/0.18/booting/index.html.gz index 4431d9bca4..fbbd6272d5 100644 Binary files a/gems/dry-system/0.18/booting/index.html.gz and b/gems/dry-system/0.18/booting/index.html.gz differ diff --git a/gems/dry-system/0.18/component-providers/index.html b/gems/dry-system/0.18/component-providers/index.html index e238d48d2b..0badbb0c2b 100644 --- a/gems/dry-system/0.18/component-providers/index.html +++ b/gems/dry-system/0.18/component-providers/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

+});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

Bootable components are handled by component providers, which can register themselves and set up their components. Let's say we want to provide a common exception notifier for many applications. First, we register our provider called :common:

# my_gem
diff --git a/gems/dry-system/0.18/component-providers/index.html.gz b/gems/dry-system/0.18/component-providers/index.html.gz
index bb9431881e..cf65d96895 100644
Binary files a/gems/dry-system/0.18/component-providers/index.html.gz and b/gems/dry-system/0.18/component-providers/index.html.gz differ
diff --git a/gems/dry-system/0.18/container/index.html b/gems/dry-system/0.18/container/index.html
index a2f6ec3260..11a1aa2528 100644
--- a/gems/dry-system/0.18/container/index.html
+++ b/gems/dry-system/0.18/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

Main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

Main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system/container'
diff --git a/gems/dry-system/0.18/container/index.html.gz b/gems/dry-system/0.18/container/index.html.gz
index 16b037c3f7..01f6849e47 100644
Binary files a/gems/dry-system/0.18/container/index.html.gz and b/gems/dry-system/0.18/container/index.html.gz differ
diff --git a/gems/dry-system/0.18/index.html b/gems/dry-system/0.18/index.html
index 1634f8bb0a..e7b3a08880 100644
--- a/gems/dry-system/0.18/index.html
+++ b/gems/dry-system/0.18/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/0.18/index.html.gz b/gems/dry-system/0.18/index.html.gz index debc0ac5c4..a7f82efb35 100644 Binary files a/gems/dry-system/0.18/index.html.gz and b/gems/dry-system/0.18/index.html.gz differ diff --git a/gems/dry-system/0.18/plugins/index.html b/gems/dry-system/0.18/plugins/index.html index 36e1b149cf..320f4502c9 100644 --- a/gems/dry-system/0.18/plugins/index.html +++ b/gems/dry-system/0.18/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

Dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Settings

Basic usage

diff --git a/gems/dry-system/0.18/settings/index.html.gz b/gems/dry-system/0.18/settings/index.html.gz index e6d230e1ec..bfd25e1f3a 100644 Binary files a/gems/dry-system/0.18/settings/index.html.gz and b/gems/dry-system/0.18/settings/index.html.gz differ diff --git a/gems/dry-system/0.18/test-mode/index.html b/gems/dry-system/0.18/test-mode/index.html index f0ed48448d..90b68aef89 100644 --- a/gems/dry-system/0.18/test-mode/index.html +++ b/gems/dry-system/0.18/test-mode/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system/container'
 
diff --git a/gems/dry-system/0.18/test-mode/index.html.gz b/gems/dry-system/0.18/test-mode/index.html.gz
index 2d27615522..50d47e62a2 100644
Binary files a/gems/dry-system/0.18/test-mode/index.html.gz and b/gems/dry-system/0.18/test-mode/index.html.gz differ
diff --git a/gems/dry-system/0.19/auto-import/index.html b/gems/dry-system/0.19/auto-import/index.html
index 972aa982c3..17302b2d46 100644
--- a/gems/dry-system/0.19/auto-import/index.html
+++ b/gems/dry-system/0.19/auto-import/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

+});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

Let's say we have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/0.19/auto-import/index.html.gz b/gems/dry-system/0.19/auto-import/index.html.gz
index ea2ae05d75..a874337a8c 100644
Binary files a/gems/dry-system/0.19/auto-import/index.html.gz and b/gems/dry-system/0.19/auto-import/index.html.gz differ
diff --git a/gems/dry-system/0.19/booting/index.html b/gems/dry-system/0.19/booting/index.html
index e669f77934..a91c191c8f 100644
--- a/gems/dry-system/0.19/booting/index.html
+++ b/gems/dry-system/0.19/booting/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

+});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

Because of this reason dry-system has the concept of booting a dependency.

diff --git a/gems/dry-system/0.19/booting/index.html.gz b/gems/dry-system/0.19/booting/index.html.gz index 64936345eb..b01609235c 100644 Binary files a/gems/dry-system/0.19/booting/index.html.gz and b/gems/dry-system/0.19/booting/index.html.gz differ diff --git a/gems/dry-system/0.19/component-providers/index.html b/gems/dry-system/0.19/component-providers/index.html index 359d47ae5f..25b9d86b85 100644 --- a/gems/dry-system/0.19/component-providers/index.html +++ b/gems/dry-system/0.19/component-providers/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

+});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

Bootable components are handled by component providers, which can register themselves and set up their components. Let's say we want to provide a common exception notifier for many applications. First, we register our provider called :common:

# my_gem
diff --git a/gems/dry-system/0.19/component-providers/index.html.gz b/gems/dry-system/0.19/component-providers/index.html.gz
index e539b79249..8592baee8a 100644
Binary files a/gems/dry-system/0.19/component-providers/index.html.gz and b/gems/dry-system/0.19/component-providers/index.html.gz differ
diff --git a/gems/dry-system/0.19/container/index.html b/gems/dry-system/0.19/container/index.html
index 1c7e1d63e4..624c40dd2f 100644
--- a/gems/dry-system/0.19/container/index.html
+++ b/gems/dry-system/0.19/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system/container'
diff --git a/gems/dry-system/0.19/container/index.html.gz b/gems/dry-system/0.19/container/index.html.gz
index ea76f3af9e..15441c8370 100644
Binary files a/gems/dry-system/0.19/container/index.html.gz and b/gems/dry-system/0.19/container/index.html.gz differ
diff --git a/gems/dry-system/0.19/index.html b/gems/dry-system/0.19/index.html
index fd18e172be..cdd1aa34d6 100644
--- a/gems/dry-system/0.19/index.html
+++ b/gems/dry-system/0.19/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/0.19/index.html.gz b/gems/dry-system/0.19/index.html.gz index 2a4001fd7e..c7a05916f6 100644 Binary files a/gems/dry-system/0.19/index.html.gz and b/gems/dry-system/0.19/index.html.gz differ diff --git a/gems/dry-system/0.19/plugins/index.html b/gems/dry-system/0.19/plugins/index.html index 90184f6d52..5c4a8b57c1 100644 --- a/gems/dry-system/0.19/plugins/index.html +++ b/gems/dry-system/0.19/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

Dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Settings

Basic usage

diff --git a/gems/dry-system/0.19/settings/index.html.gz b/gems/dry-system/0.19/settings/index.html.gz index d17218a8ec..50fcefcf57 100644 Binary files a/gems/dry-system/0.19/settings/index.html.gz and b/gems/dry-system/0.19/settings/index.html.gz differ diff --git a/gems/dry-system/0.19/test-mode/index.html b/gems/dry-system/0.19/test-mode/index.html index 49fa374dc6..9f5ae869db 100644 --- a/gems/dry-system/0.19/test-mode/index.html +++ b/gems/dry-system/0.19/test-mode/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system/container'
 
diff --git a/gems/dry-system/0.19/test-mode/index.html.gz b/gems/dry-system/0.19/test-mode/index.html.gz
index 063327608b..d44a8f62bf 100644
Binary files a/gems/dry-system/0.19/test-mode/index.html.gz and b/gems/dry-system/0.19/test-mode/index.html.gz differ
diff --git a/gems/dry-system/0.2/component-dirs/index.html b/gems/dry-system/0.2/component-dirs/index.html
index 7216b0dd09..7c6504b0df 100644
--- a/gems/dry-system/0.2/component-dirs/index.html
+++ b/gems/dry-system/0.2/component-dirs/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

+});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

You can configure one or more component dirs:

class Application < Dry::System::Container
diff --git a/gems/dry-system/0.2/component-dirs/index.html.gz b/gems/dry-system/0.2/component-dirs/index.html.gz
index eeb3f78f4f..ffb8f724b6 100644
Binary files a/gems/dry-system/0.2/component-dirs/index.html.gz and b/gems/dry-system/0.2/component-dirs/index.html.gz differ
diff --git a/gems/dry-system/0.2/container/index.html b/gems/dry-system/0.2/container/index.html
index ff77a0fc3c..45a4fac7a8 100644
--- a/gems/dry-system/0.2/container/index.html
+++ b/gems/dry-system/0.2/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system/container'
diff --git a/gems/dry-system/0.2/container/index.html.gz b/gems/dry-system/0.2/container/index.html.gz
index b95c1d9e72..044efce4a7 100644
Binary files a/gems/dry-system/0.2/container/index.html.gz and b/gems/dry-system/0.2/container/index.html.gz differ
diff --git a/gems/dry-system/0.2/dependency-auto-injection/index.html b/gems/dry-system/0.2/dependency-auto-injection/index.html
index 52c06fd6b5..51a0cfa352 100644
--- a/gems/dry-system/0.2/dependency-auto-injection/index.html
+++ b/gems/dry-system/0.2/dependency-auto-injection/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Dependency auto-injection

After defining your container, you can use its auto-injector as a mixin to declare a component's dependencies using their container keys.

+});

Dependency auto-injection

After defining your container, you can use its auto-injector as a mixin to declare a component's dependencies using their container keys.

For example, if you have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/0.2/dependency-auto-injection/index.html.gz b/gems/dry-system/0.2/dependency-auto-injection/index.html.gz
index 6f623ec7fd..9190b910be 100644
Binary files a/gems/dry-system/0.2/dependency-auto-injection/index.html.gz and b/gems/dry-system/0.2/dependency-auto-injection/index.html.gz differ
diff --git a/gems/dry-system/0.2/external-provider-sources/index.html b/gems/dry-system/0.2/external-provider-sources/index.html
index f9609d5628..71952c6d09 100644
--- a/gems/dry-system/0.2/external-provider-sources/index.html
+++ b/gems/dry-system/0.2/external-provider-sources/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

External provider sources

You can distribute your own components to other dry-system users via external provider sources, which can be used as the basis for providers within any dry-system container.

+});

External provider sources

You can distribute your own components to other dry-system users via external provider sources, which can be used as the basis for providers within any dry-system container.

Provider sources look and work the same as regular providers, which means allowing you to use their full lifecycle for creating, configuring, and registering your components.

diff --git a/gems/dry-system/0.2/external-provider-sources/index.html.gz b/gems/dry-system/0.2/external-provider-sources/index.html.gz index fb1b7a8e23..43ab7ea807 100644 Binary files a/gems/dry-system/0.2/external-provider-sources/index.html.gz and b/gems/dry-system/0.2/external-provider-sources/index.html.gz differ diff --git a/gems/dry-system/0.2/index.html b/gems/dry-system/0.2/index.html index f79c319c49..47628e1127 100644 --- a/gems/dry-system/0.2/index.html +++ b/gems/dry-system/0.2/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/0.2/index.html.gz b/gems/dry-system/0.2/index.html.gz index bfb8965fee..2dbadc4067 100644 Binary files a/gems/dry-system/0.2/index.html.gz and b/gems/dry-system/0.2/index.html.gz differ diff --git a/gems/dry-system/0.2/plugins/index.html b/gems/dry-system/0.2/plugins/index.html index 60821ce482..8181ca2368 100644 --- a/gems/dry-system/0.2/plugins/index.html +++ b/gems/dry-system/0.2/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Providers

Some components can be large, stateful, or requiring specific configuration as part of their setup (such as when dealing with third party code). You can use providers to manage and register these components across several distinct lifecycle steps.

+});

Providers

Some components can be large, stateful, or requiring specific configuration as part of their setup (such as when dealing with third party code). You can use providers to manage and register these components across several distinct lifecycle steps.

You can define your providers as individual source files in system/providers/, for example:

# system/providers/persistence.rb
diff --git a/gems/dry-system/0.2/providers/index.html.gz b/gems/dry-system/0.2/providers/index.html.gz
index b2d3ebd519..c08d8dc55e 100644
Binary files a/gems/dry-system/0.2/providers/index.html.gz and b/gems/dry-system/0.2/providers/index.html.gz differ
diff --git a/gems/dry-system/0.2/settings/index.html b/gems/dry-system/0.2/settings/index.html
index 6e4af1c342..134fd0d420 100644
--- a/gems/dry-system/0.2/settings/index.html
+++ b/gems/dry-system/0.2/settings/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Settings

Basic usage

diff --git a/gems/dry-system/0.2/settings/index.html.gz b/gems/dry-system/0.2/settings/index.html.gz index 10703553bb..55397ccea6 100644 Binary files a/gems/dry-system/0.2/settings/index.html.gz and b/gems/dry-system/0.2/settings/index.html.gz differ diff --git a/gems/dry-system/0.2/test-mode/index.html b/gems/dry-system/0.2/test-mode/index.html index 465bf0127b..7676001fac 100644 --- a/gems/dry-system/0.2/test-mode/index.html +++ b/gems/dry-system/0.2/test-mode/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system/container'
 
diff --git a/gems/dry-system/0.2/test-mode/index.html.gz b/gems/dry-system/0.2/test-mode/index.html.gz
index 8b515c1e6b..874e571245 100644
Binary files a/gems/dry-system/0.2/test-mode/index.html.gz and b/gems/dry-system/0.2/test-mode/index.html.gz differ
diff --git a/gems/dry-system/0.20/auto-import/index.html b/gems/dry-system/0.20/auto-import/index.html
index 146eb13871..e9419879c5 100644
--- a/gems/dry-system/0.20/auto-import/index.html
+++ b/gems/dry-system/0.20/auto-import/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

+});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

Let's say we have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/0.20/auto-import/index.html.gz b/gems/dry-system/0.20/auto-import/index.html.gz
index 9fb12c1d60..43a83c6274 100644
Binary files a/gems/dry-system/0.20/auto-import/index.html.gz and b/gems/dry-system/0.20/auto-import/index.html.gz differ
diff --git a/gems/dry-system/0.20/booting/index.html b/gems/dry-system/0.20/booting/index.html
index f6e3cb6785..56c7cd29ec 100644
--- a/gems/dry-system/0.20/booting/index.html
+++ b/gems/dry-system/0.20/booting/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

+});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

Because of this reason dry-system has the concept of booting a dependency.

diff --git a/gems/dry-system/0.20/booting/index.html.gz b/gems/dry-system/0.20/booting/index.html.gz index 04aa06d4fb..57e23c7415 100644 Binary files a/gems/dry-system/0.20/booting/index.html.gz and b/gems/dry-system/0.20/booting/index.html.gz differ diff --git a/gems/dry-system/0.20/component-providers/index.html b/gems/dry-system/0.20/component-providers/index.html index 10cf02da10..fcc6bd2f83 100644 --- a/gems/dry-system/0.20/component-providers/index.html +++ b/gems/dry-system/0.20/component-providers/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

+});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

Bootable components are handled by component providers, which can register themselves and set up their components. Let's say we want to provide a common exception notifier for many applications. First, we register our provider called :common:

# my_gem
diff --git a/gems/dry-system/0.20/component-providers/index.html.gz b/gems/dry-system/0.20/component-providers/index.html.gz
index a0378a7135..1a5d1a5e66 100644
Binary files a/gems/dry-system/0.20/component-providers/index.html.gz and b/gems/dry-system/0.20/component-providers/index.html.gz differ
diff --git a/gems/dry-system/0.20/container/index.html b/gems/dry-system/0.20/container/index.html
index 2dcf207037..3a6ea25e0f 100644
--- a/gems/dry-system/0.20/container/index.html
+++ b/gems/dry-system/0.20/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system/container'
diff --git a/gems/dry-system/0.20/container/index.html.gz b/gems/dry-system/0.20/container/index.html.gz
index b018036a40..be7a389834 100644
Binary files a/gems/dry-system/0.20/container/index.html.gz and b/gems/dry-system/0.20/container/index.html.gz differ
diff --git a/gems/dry-system/0.20/index.html b/gems/dry-system/0.20/index.html
index ccd77125a5..320d9fad4a 100644
--- a/gems/dry-system/0.20/index.html
+++ b/gems/dry-system/0.20/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/0.20/index.html.gz b/gems/dry-system/0.20/index.html.gz index 780dd62bd4..fa3f878ffa 100644 Binary files a/gems/dry-system/0.20/index.html.gz and b/gems/dry-system/0.20/index.html.gz differ diff --git a/gems/dry-system/0.20/plugins/index.html b/gems/dry-system/0.20/plugins/index.html index c29e9336dd..372a36ba19 100644 --- a/gems/dry-system/0.20/plugins/index.html +++ b/gems/dry-system/0.20/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

Dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Settings

Basic usage

diff --git a/gems/dry-system/0.20/settings/index.html.gz b/gems/dry-system/0.20/settings/index.html.gz index df82b67902..ecff6a9bde 100644 Binary files a/gems/dry-system/0.20/settings/index.html.gz and b/gems/dry-system/0.20/settings/index.html.gz differ diff --git a/gems/dry-system/0.20/test-mode/index.html b/gems/dry-system/0.20/test-mode/index.html index 6b10c98981..b1a28cc02a 100644 --- a/gems/dry-system/0.20/test-mode/index.html +++ b/gems/dry-system/0.20/test-mode/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system/container'
 
diff --git a/gems/dry-system/0.20/test-mode/index.html.gz b/gems/dry-system/0.20/test-mode/index.html.gz
index bf025ea32b..1830b390f2 100644
Binary files a/gems/dry-system/0.20/test-mode/index.html.gz and b/gems/dry-system/0.20/test-mode/index.html.gz differ
diff --git a/gems/dry-system/0.21/auto-import/index.html b/gems/dry-system/0.21/auto-import/index.html
index 79a355168e..4aca776d8d 100644
--- a/gems/dry-system/0.21/auto-import/index.html
+++ b/gems/dry-system/0.21/auto-import/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

+});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

Let's say we have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/0.21/auto-import/index.html.gz b/gems/dry-system/0.21/auto-import/index.html.gz
index 4d61e7bcb5..8d8950529c 100644
Binary files a/gems/dry-system/0.21/auto-import/index.html.gz and b/gems/dry-system/0.21/auto-import/index.html.gz differ
diff --git a/gems/dry-system/0.21/booting/index.html b/gems/dry-system/0.21/booting/index.html
index 2fcf1c2121..97779b1006 100644
--- a/gems/dry-system/0.21/booting/index.html
+++ b/gems/dry-system/0.21/booting/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

+});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

Because of this reason dry-system has the concept of booting a dependency.

diff --git a/gems/dry-system/0.21/booting/index.html.gz b/gems/dry-system/0.21/booting/index.html.gz index f95c4f4c94..96f684e2f2 100644 Binary files a/gems/dry-system/0.21/booting/index.html.gz and b/gems/dry-system/0.21/booting/index.html.gz differ diff --git a/gems/dry-system/0.21/component-dirs/index.html b/gems/dry-system/0.21/component-dirs/index.html index 5c519d7c08..7f7d1acc0d 100644 --- a/gems/dry-system/0.21/component-dirs/index.html +++ b/gems/dry-system/0.21/component-dirs/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

+});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

You can configure one or more component dirs:

class Application < Dry::System::Container
diff --git a/gems/dry-system/0.21/component-dirs/index.html.gz b/gems/dry-system/0.21/component-dirs/index.html.gz
index 505607a4de..a7fda5fe5a 100644
Binary files a/gems/dry-system/0.21/component-dirs/index.html.gz and b/gems/dry-system/0.21/component-dirs/index.html.gz differ
diff --git a/gems/dry-system/0.21/component-providers/index.html b/gems/dry-system/0.21/component-providers/index.html
index bdc53e868f..3ef1c6f5b7 100644
--- a/gems/dry-system/0.21/component-providers/index.html
+++ b/gems/dry-system/0.21/component-providers/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

+});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

Bootable components are handled by component providers, which can register themselves and set up their components. Let's say we want to provide a common exception notifier for many applications. First, we register our provider called :common:

# my_gem
diff --git a/gems/dry-system/0.21/component-providers/index.html.gz b/gems/dry-system/0.21/component-providers/index.html.gz
index 6c70ac4724..798af382ca 100644
Binary files a/gems/dry-system/0.21/component-providers/index.html.gz and b/gems/dry-system/0.21/component-providers/index.html.gz differ
diff --git a/gems/dry-system/0.21/container/index.html b/gems/dry-system/0.21/container/index.html
index 5c93bc224c..a1b3f13571 100644
--- a/gems/dry-system/0.21/container/index.html
+++ b/gems/dry-system/0.21/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system/container'
diff --git a/gems/dry-system/0.21/container/index.html.gz b/gems/dry-system/0.21/container/index.html.gz
index 72910d8736..d266eaae91 100644
Binary files a/gems/dry-system/0.21/container/index.html.gz and b/gems/dry-system/0.21/container/index.html.gz differ
diff --git a/gems/dry-system/0.21/index.html b/gems/dry-system/0.21/index.html
index 8ec9ae2f73..64f13bbe72 100644
--- a/gems/dry-system/0.21/index.html
+++ b/gems/dry-system/0.21/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/0.21/index.html.gz b/gems/dry-system/0.21/index.html.gz index ffe1a69f99..1430ed12df 100644 Binary files a/gems/dry-system/0.21/index.html.gz and b/gems/dry-system/0.21/index.html.gz differ diff --git a/gems/dry-system/0.21/plugins/index.html b/gems/dry-system/0.21/plugins/index.html index 704b75f203..337bee2e1e 100644 --- a/gems/dry-system/0.21/plugins/index.html +++ b/gems/dry-system/0.21/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

Dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Settings

Basic usage

diff --git a/gems/dry-system/0.21/settings/index.html.gz b/gems/dry-system/0.21/settings/index.html.gz index 832183dc5b..7ab4b17aba 100644 Binary files a/gems/dry-system/0.21/settings/index.html.gz and b/gems/dry-system/0.21/settings/index.html.gz differ diff --git a/gems/dry-system/0.21/test-mode/index.html b/gems/dry-system/0.21/test-mode/index.html index d51f700e43..a887ae8c9f 100644 --- a/gems/dry-system/0.21/test-mode/index.html +++ b/gems/dry-system/0.21/test-mode/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system/container'
 
diff --git a/gems/dry-system/0.21/test-mode/index.html.gz b/gems/dry-system/0.21/test-mode/index.html.gz
index 832b62db97..ac938818e0 100644
Binary files a/gems/dry-system/0.21/test-mode/index.html.gz and b/gems/dry-system/0.21/test-mode/index.html.gz differ
diff --git a/gems/dry-system/0.22/auto-import/index.html b/gems/dry-system/0.22/auto-import/index.html
index 4a8301f6aa..6b9c7ea98c 100644
--- a/gems/dry-system/0.22/auto-import/index.html
+++ b/gems/dry-system/0.22/auto-import/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

+});

Auto-Import

After defining a container, we can use its import module that will inject object dependencies automatically.

Let's say we have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/0.22/auto-import/index.html.gz b/gems/dry-system/0.22/auto-import/index.html.gz
index b7d713bc30..7be990ad1c 100644
Binary files a/gems/dry-system/0.22/auto-import/index.html.gz and b/gems/dry-system/0.22/auto-import/index.html.gz differ
diff --git a/gems/dry-system/0.22/booting/index.html b/gems/dry-system/0.22/booting/index.html
index bba741f993..c3f6123c61 100644
--- a/gems/dry-system/0.22/booting/index.html
+++ b/gems/dry-system/0.22/booting/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

+});

Booting a Dependency

In some cases a dependency can be huge, so huge it needs to load some additional files (often 3rd party code) and it may rely on custom configuration.

Because of this reason dry-system has the concept of booting a dependency.

diff --git a/gems/dry-system/0.22/booting/index.html.gz b/gems/dry-system/0.22/booting/index.html.gz index 45778bed25..8a6cc393ad 100644 Binary files a/gems/dry-system/0.22/booting/index.html.gz and b/gems/dry-system/0.22/booting/index.html.gz differ diff --git a/gems/dry-system/0.22/component-dirs/index.html b/gems/dry-system/0.22/component-dirs/index.html index aff1319fc5..0fe6677f0b 100644 --- a/gems/dry-system/0.22/component-dirs/index.html +++ b/gems/dry-system/0.22/component-dirs/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

+});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

You can configure one or more component dirs:

class Application < Dry::System::Container
diff --git a/gems/dry-system/0.22/component-dirs/index.html.gz b/gems/dry-system/0.22/component-dirs/index.html.gz
index 070ab8a6eb..ba5a6da8df 100644
Binary files a/gems/dry-system/0.22/component-dirs/index.html.gz and b/gems/dry-system/0.22/component-dirs/index.html.gz differ
diff --git a/gems/dry-system/0.22/component-providers/index.html b/gems/dry-system/0.22/component-providers/index.html
index 2fc41de8c2..aad2237489 100644
--- a/gems/dry-system/0.22/component-providers/index.html
+++ b/gems/dry-system/0.22/component-providers/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

+});

Component Providers

External dependencies can be provided as bootable components, these components can be shared across applications with the ability to configure them and customize booting process. This is especially useful in situations where you have a set of applications with many common components.

Bootable components are handled by component providers, which can register themselves and set up their components. Let's say we want to provide a common exception notifier for many applications. First, we register our provider called :common:

# my_gem
diff --git a/gems/dry-system/0.22/component-providers/index.html.gz b/gems/dry-system/0.22/component-providers/index.html.gz
index f689ffdd38..d093d3d7d5 100644
Binary files a/gems/dry-system/0.22/component-providers/index.html.gz and b/gems/dry-system/0.22/component-providers/index.html.gz differ
diff --git a/gems/dry-system/0.22/container/index.html b/gems/dry-system/0.22/container/index.html
index ae93ba6c9a..44370c03b8 100644
--- a/gems/dry-system/0.22/container/index.html
+++ b/gems/dry-system/0.22/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system/container'
diff --git a/gems/dry-system/0.22/container/index.html.gz b/gems/dry-system/0.22/container/index.html.gz
index 9c8548cd6f..a4fb0c8d40 100644
Binary files a/gems/dry-system/0.22/container/index.html.gz and b/gems/dry-system/0.22/container/index.html.gz differ
diff --git a/gems/dry-system/0.22/index.html b/gems/dry-system/0.22/index.html
index 877986c799..625717a44d 100644
--- a/gems/dry-system/0.22/index.html
+++ b/gems/dry-system/0.22/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/0.22/index.html.gz b/gems/dry-system/0.22/index.html.gz index 4ca7600447..84cd7a8063 100644 Binary files a/gems/dry-system/0.22/index.html.gz and b/gems/dry-system/0.22/index.html.gz differ diff --git a/gems/dry-system/0.22/plugins/index.html b/gems/dry-system/0.22/plugins/index.html index d7f3a770c9..81d423271b 100644 --- a/gems/dry-system/0.22/plugins/index.html +++ b/gems/dry-system/0.22/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

Dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Settings

Basic usage

diff --git a/gems/dry-system/0.22/settings/index.html.gz b/gems/dry-system/0.22/settings/index.html.gz index 1a21175f4b..7242a3894b 100644 Binary files a/gems/dry-system/0.22/settings/index.html.gz and b/gems/dry-system/0.22/settings/index.html.gz differ diff --git a/gems/dry-system/0.22/test-mode/index.html b/gems/dry-system/0.22/test-mode/index.html index 41eac2db25..fc6c5cd9f5 100644 --- a/gems/dry-system/0.22/test-mode/index.html +++ b/gems/dry-system/0.22/test-mode/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system/container'
 
diff --git a/gems/dry-system/0.22/test-mode/index.html.gz b/gems/dry-system/0.22/test-mode/index.html.gz
index 6f4f9a4478..403d42ce21 100644
Binary files a/gems/dry-system/0.22/test-mode/index.html.gz and b/gems/dry-system/0.22/test-mode/index.html.gz differ
diff --git a/gems/dry-system/0.23/component-dirs/index.html b/gems/dry-system/0.23/component-dirs/index.html
index e775289ba2..8d632eba72 100644
--- a/gems/dry-system/0.23/component-dirs/index.html
+++ b/gems/dry-system/0.23/component-dirs/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

+});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

You can configure one or more component dirs:

class Application < Dry::System::Container
diff --git a/gems/dry-system/0.23/component-dirs/index.html.gz b/gems/dry-system/0.23/component-dirs/index.html.gz
index 6b4422863e..17389be2f7 100644
Binary files a/gems/dry-system/0.23/component-dirs/index.html.gz and b/gems/dry-system/0.23/component-dirs/index.html.gz differ
diff --git a/gems/dry-system/0.23/container/index.html b/gems/dry-system/0.23/container/index.html
index 86120b8554..d9b0a15e27 100644
--- a/gems/dry-system/0.23/container/index.html
+++ b/gems/dry-system/0.23/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system/container'
diff --git a/gems/dry-system/0.23/container/index.html.gz b/gems/dry-system/0.23/container/index.html.gz
index 6859be7f73..fa7216dbeb 100644
Binary files a/gems/dry-system/0.23/container/index.html.gz and b/gems/dry-system/0.23/container/index.html.gz differ
diff --git a/gems/dry-system/0.23/dependency-auto-injection/index.html b/gems/dry-system/0.23/dependency-auto-injection/index.html
index 01344e075f..7cd97c4ae4 100644
--- a/gems/dry-system/0.23/dependency-auto-injection/index.html
+++ b/gems/dry-system/0.23/dependency-auto-injection/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Dependency auto-injection

After defining your container, you can use its auto-injector as a mixin to declare a component's dependencies using their container keys.

+});

Dependency auto-injection

After defining your container, you can use its auto-injector as a mixin to declare a component's dependencies using their container keys.

For example, if you have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/0.23/dependency-auto-injection/index.html.gz b/gems/dry-system/0.23/dependency-auto-injection/index.html.gz
index fb3697fa96..a17d08287f 100644
Binary files a/gems/dry-system/0.23/dependency-auto-injection/index.html.gz and b/gems/dry-system/0.23/dependency-auto-injection/index.html.gz differ
diff --git a/gems/dry-system/0.23/external-provider-sources/index.html b/gems/dry-system/0.23/external-provider-sources/index.html
index 451cea1e5b..90d0b185c0 100644
--- a/gems/dry-system/0.23/external-provider-sources/index.html
+++ b/gems/dry-system/0.23/external-provider-sources/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

External provider sources

You can distribute your own components to other dry-system users via external provider sources, which can be used as the basis for providers within any dry-system container.

+});

External provider sources

You can distribute your own components to other dry-system users via external provider sources, which can be used as the basis for providers within any dry-system container.

Provider sources look and work the same as regular providers, which means allowing you to use their full lifecycle for creating, configuring, and registering your components.

diff --git a/gems/dry-system/0.23/external-provider-sources/index.html.gz b/gems/dry-system/0.23/external-provider-sources/index.html.gz index 2959d45e7b..c742a14e78 100644 Binary files a/gems/dry-system/0.23/external-provider-sources/index.html.gz and b/gems/dry-system/0.23/external-provider-sources/index.html.gz differ diff --git a/gems/dry-system/0.23/index.html b/gems/dry-system/0.23/index.html index abf35bf7ae..78b88fcd85 100644 --- a/gems/dry-system/0.23/index.html +++ b/gems/dry-system/0.23/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/0.23/index.html.gz b/gems/dry-system/0.23/index.html.gz index 9bb9158735..ad70472534 100644 Binary files a/gems/dry-system/0.23/index.html.gz and b/gems/dry-system/0.23/index.html.gz differ diff --git a/gems/dry-system/0.23/plugins/index.html b/gems/dry-system/0.23/plugins/index.html index 00e4d835c7..e595905fb2 100644 --- a/gems/dry-system/0.23/plugins/index.html +++ b/gems/dry-system/0.23/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Providers

Some components can be large, stateful, or requiring specific configuration as part of their setup (such as when dealing with third party code). You can use providers to manage and register these components across several distinct lifecycle steps.

+});

Providers

Some components can be large, stateful, or requiring specific configuration as part of their setup (such as when dealing with third party code). You can use providers to manage and register these components across several distinct lifecycle steps.

You can define your providers as individual source files in system/providers/, for example:

# system/providers/persistence.rb
diff --git a/gems/dry-system/0.23/providers/index.html.gz b/gems/dry-system/0.23/providers/index.html.gz
index c0c5884702..4efd599e4b 100644
Binary files a/gems/dry-system/0.23/providers/index.html.gz and b/gems/dry-system/0.23/providers/index.html.gz differ
diff --git a/gems/dry-system/0.23/settings/index.html b/gems/dry-system/0.23/settings/index.html
index 5005083603..83ba2664e5 100644
--- a/gems/dry-system/0.23/settings/index.html
+++ b/gems/dry-system/0.23/settings/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Settings

Basic usage

diff --git a/gems/dry-system/0.23/settings/index.html.gz b/gems/dry-system/0.23/settings/index.html.gz index d78cbdf560..6f3bc1bb80 100644 Binary files a/gems/dry-system/0.23/settings/index.html.gz and b/gems/dry-system/0.23/settings/index.html.gz differ diff --git a/gems/dry-system/0.23/test-mode/index.html b/gems/dry-system/0.23/test-mode/index.html index 705f016518..103915cd98 100644 --- a/gems/dry-system/0.23/test-mode/index.html +++ b/gems/dry-system/0.23/test-mode/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system/container'
 
diff --git a/gems/dry-system/0.23/test-mode/index.html.gz b/gems/dry-system/0.23/test-mode/index.html.gz
index a1a4860411..e10cfb04da 100644
Binary files a/gems/dry-system/0.23/test-mode/index.html.gz and b/gems/dry-system/0.23/test-mode/index.html.gz differ
diff --git a/gems/dry-system/0.24/component-dirs/index.html b/gems/dry-system/0.24/component-dirs/index.html
index 9f6ab2753b..4e2c280efb 100644
--- a/gems/dry-system/0.24/component-dirs/index.html
+++ b/gems/dry-system/0.24/component-dirs/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

+});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

You can configure one or more component dirs:

class Application < Dry::System::Container
diff --git a/gems/dry-system/0.24/component-dirs/index.html.gz b/gems/dry-system/0.24/component-dirs/index.html.gz
index c4ac195078..1d4b0c820e 100644
Binary files a/gems/dry-system/0.24/component-dirs/index.html.gz and b/gems/dry-system/0.24/component-dirs/index.html.gz differ
diff --git a/gems/dry-system/0.24/container/index.html b/gems/dry-system/0.24/container/index.html
index dadbd48820..ff1d3ecb89 100644
--- a/gems/dry-system/0.24/container/index.html
+++ b/gems/dry-system/0.24/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system/container'
diff --git a/gems/dry-system/0.24/container/index.html.gz b/gems/dry-system/0.24/container/index.html.gz
index ebb6365f63..ffb9bbde30 100644
Binary files a/gems/dry-system/0.24/container/index.html.gz and b/gems/dry-system/0.24/container/index.html.gz differ
diff --git a/gems/dry-system/0.24/dependency-auto-injection/index.html b/gems/dry-system/0.24/dependency-auto-injection/index.html
index cecef7c5fc..caa99677d6 100644
--- a/gems/dry-system/0.24/dependency-auto-injection/index.html
+++ b/gems/dry-system/0.24/dependency-auto-injection/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Dependency auto-injection

After defining your container, you can use its auto-injector as a mixin to declare a component's dependencies using their container keys.

+});

Dependency auto-injection

After defining your container, you can use its auto-injector as a mixin to declare a component's dependencies using their container keys.

For example, if you have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/0.24/dependency-auto-injection/index.html.gz b/gems/dry-system/0.24/dependency-auto-injection/index.html.gz
index 268b5ffd44..c37a0b6f0f 100644
Binary files a/gems/dry-system/0.24/dependency-auto-injection/index.html.gz and b/gems/dry-system/0.24/dependency-auto-injection/index.html.gz differ
diff --git a/gems/dry-system/0.24/external-provider-sources/index.html b/gems/dry-system/0.24/external-provider-sources/index.html
index b937071682..ef8498a3c2 100644
--- a/gems/dry-system/0.24/external-provider-sources/index.html
+++ b/gems/dry-system/0.24/external-provider-sources/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

External provider sources

You can distribute your own components to other dry-system users via external provider sources, which can be used as the basis for providers within any dry-system container.

+});

External provider sources

You can distribute your own components to other dry-system users via external provider sources, which can be used as the basis for providers within any dry-system container.

Provider sources look and work the same as regular providers, which means allowing you to use their full lifecycle for creating, configuring, and registering your components.

diff --git a/gems/dry-system/0.24/external-provider-sources/index.html.gz b/gems/dry-system/0.24/external-provider-sources/index.html.gz index 6036941153..f3873611fa 100644 Binary files a/gems/dry-system/0.24/external-provider-sources/index.html.gz and b/gems/dry-system/0.24/external-provider-sources/index.html.gz differ diff --git a/gems/dry-system/0.24/index.html b/gems/dry-system/0.24/index.html index ea9e3067c9..534cf17968 100644 --- a/gems/dry-system/0.24/index.html +++ b/gems/dry-system/0.24/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/0.24/index.html.gz b/gems/dry-system/0.24/index.html.gz index aa1981326a..74bb7ebea4 100644 Binary files a/gems/dry-system/0.24/index.html.gz and b/gems/dry-system/0.24/index.html.gz differ diff --git a/gems/dry-system/0.24/plugins/index.html b/gems/dry-system/0.24/plugins/index.html index 9247676c30..026acf01a4 100644 --- a/gems/dry-system/0.24/plugins/index.html +++ b/gems/dry-system/0.24/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Providers

Some components can be large, stateful, or requiring specific configuration as part of their setup (such as when dealing with third party code). You can use providers to manage and register these components across several distinct lifecycle steps.

+});

Providers

Some components can be large, stateful, or requiring specific configuration as part of their setup (such as when dealing with third party code). You can use providers to manage and register these components across several distinct lifecycle steps.

You can define your providers as individual source files in system/providers/, for example:

# system/providers/persistence.rb
diff --git a/gems/dry-system/0.24/providers/index.html.gz b/gems/dry-system/0.24/providers/index.html.gz
index 7bbb11e255..b7c811c9c8 100644
Binary files a/gems/dry-system/0.24/providers/index.html.gz and b/gems/dry-system/0.24/providers/index.html.gz differ
diff --git a/gems/dry-system/0.24/settings/index.html b/gems/dry-system/0.24/settings/index.html
index f470fc5f08..26b57836c5 100644
--- a/gems/dry-system/0.24/settings/index.html
+++ b/gems/dry-system/0.24/settings/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Settings

Basic usage

diff --git a/gems/dry-system/0.24/settings/index.html.gz b/gems/dry-system/0.24/settings/index.html.gz index b9ac60020c..2d43cc0d8f 100644 Binary files a/gems/dry-system/0.24/settings/index.html.gz and b/gems/dry-system/0.24/settings/index.html.gz differ diff --git a/gems/dry-system/0.24/test-mode/index.html b/gems/dry-system/0.24/test-mode/index.html index 4d91c3b2c4..2f7a13caa7 100644 --- a/gems/dry-system/0.24/test-mode/index.html +++ b/gems/dry-system/0.24/test-mode/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system/container'
 
diff --git a/gems/dry-system/0.24/test-mode/index.html.gz b/gems/dry-system/0.24/test-mode/index.html.gz
index 2acb71a534..b2146ad297 100644
Binary files a/gems/dry-system/0.24/test-mode/index.html.gz and b/gems/dry-system/0.24/test-mode/index.html.gz differ
diff --git a/gems/dry-system/0.25/component-dirs/index.html b/gems/dry-system/0.25/component-dirs/index.html
index 3c764ccfc8..ef4afaee73 100644
--- a/gems/dry-system/0.25/component-dirs/index.html
+++ b/gems/dry-system/0.25/component-dirs/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

+});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

You can configure one or more component dirs:

class Application < Dry::System::Container
diff --git a/gems/dry-system/0.25/component-dirs/index.html.gz b/gems/dry-system/0.25/component-dirs/index.html.gz
index 9b38416a95..11e966a05d 100644
Binary files a/gems/dry-system/0.25/component-dirs/index.html.gz and b/gems/dry-system/0.25/component-dirs/index.html.gz differ
diff --git a/gems/dry-system/0.25/container/index.html b/gems/dry-system/0.25/container/index.html
index d661e064c8..904e85ea15 100644
--- a/gems/dry-system/0.25/container/index.html
+++ b/gems/dry-system/0.25/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system/container'
diff --git a/gems/dry-system/0.25/container/index.html.gz b/gems/dry-system/0.25/container/index.html.gz
index 9c9c3b8a82..6f639a1cfe 100644
Binary files a/gems/dry-system/0.25/container/index.html.gz and b/gems/dry-system/0.25/container/index.html.gz differ
diff --git a/gems/dry-system/0.25/dependency-auto-injection/index.html b/gems/dry-system/0.25/dependency-auto-injection/index.html
index 672120eb60..b40306224a 100644
--- a/gems/dry-system/0.25/dependency-auto-injection/index.html
+++ b/gems/dry-system/0.25/dependency-auto-injection/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Dependency auto-injection

After defining your container, you can use its auto-injector as a mixin to declare a component's dependencies using their container keys.

+});

Dependency auto-injection

After defining your container, you can use its auto-injector as a mixin to declare a component's dependencies using their container keys.

For example, if you have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/0.25/dependency-auto-injection/index.html.gz b/gems/dry-system/0.25/dependency-auto-injection/index.html.gz
index b8dfcaa126..4895b25a9f 100644
Binary files a/gems/dry-system/0.25/dependency-auto-injection/index.html.gz and b/gems/dry-system/0.25/dependency-auto-injection/index.html.gz differ
diff --git a/gems/dry-system/0.25/external-provider-sources/index.html b/gems/dry-system/0.25/external-provider-sources/index.html
index 6392672f4d..a3016a1155 100644
--- a/gems/dry-system/0.25/external-provider-sources/index.html
+++ b/gems/dry-system/0.25/external-provider-sources/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

External provider sources

You can distribute your own components to other dry-system users via external provider sources, which can be used as the basis for providers within any dry-system container.

+});

External provider sources

You can distribute your own components to other dry-system users via external provider sources, which can be used as the basis for providers within any dry-system container.

Provider sources look and work the same as regular providers, which means allowing you to use their full lifecycle for creating, configuring, and registering your components.

diff --git a/gems/dry-system/0.25/external-provider-sources/index.html.gz b/gems/dry-system/0.25/external-provider-sources/index.html.gz index 959f88e162..fec44077c6 100644 Binary files a/gems/dry-system/0.25/external-provider-sources/index.html.gz and b/gems/dry-system/0.25/external-provider-sources/index.html.gz differ diff --git a/gems/dry-system/0.25/index.html b/gems/dry-system/0.25/index.html index d4d2e5fd87..80eef89ef1 100644 --- a/gems/dry-system/0.25/index.html +++ b/gems/dry-system/0.25/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/0.25/index.html.gz b/gems/dry-system/0.25/index.html.gz index fd2e12a30c..6a01111891 100644 Binary files a/gems/dry-system/0.25/index.html.gz and b/gems/dry-system/0.25/index.html.gz differ diff --git a/gems/dry-system/0.25/plugins/index.html b/gems/dry-system/0.25/plugins/index.html index a4b19a674d..ba5efb0acc 100644 --- a/gems/dry-system/0.25/plugins/index.html +++ b/gems/dry-system/0.25/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Providers

Some components can be large, stateful, or requiring specific configuration as part of their setup (such as when dealing with third party code). You can use providers to manage and register these components across several distinct lifecycle steps.

+});

Providers

Some components can be large, stateful, or requiring specific configuration as part of their setup (such as when dealing with third party code). You can use providers to manage and register these components across several distinct lifecycle steps.

You can define your providers as individual source files in system/providers/, for example:

# system/providers/persistence.rb
diff --git a/gems/dry-system/0.25/providers/index.html.gz b/gems/dry-system/0.25/providers/index.html.gz
index a68fd46bf6..9c284fb975 100644
Binary files a/gems/dry-system/0.25/providers/index.html.gz and b/gems/dry-system/0.25/providers/index.html.gz differ
diff --git a/gems/dry-system/0.25/settings/index.html b/gems/dry-system/0.25/settings/index.html
index e5f554ec23..9319d8bbab 100644
--- a/gems/dry-system/0.25/settings/index.html
+++ b/gems/dry-system/0.25/settings/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Settings

Basic usage

diff --git a/gems/dry-system/0.25/settings/index.html.gz b/gems/dry-system/0.25/settings/index.html.gz index 2529d156d9..701e8f6241 100644 Binary files a/gems/dry-system/0.25/settings/index.html.gz and b/gems/dry-system/0.25/settings/index.html.gz differ diff --git a/gems/dry-system/0.25/test-mode/index.html b/gems/dry-system/0.25/test-mode/index.html index 4bfaa82b05..171b1db4b2 100644 --- a/gems/dry-system/0.25/test-mode/index.html +++ b/gems/dry-system/0.25/test-mode/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system/container'
 
diff --git a/gems/dry-system/0.25/test-mode/index.html.gz b/gems/dry-system/0.25/test-mode/index.html.gz
index 61046e1aa9..10dcb025de 100644
Binary files a/gems/dry-system/0.25/test-mode/index.html.gz and b/gems/dry-system/0.25/test-mode/index.html.gz differ
diff --git a/gems/dry-system/0.26/component-dirs/index.html b/gems/dry-system/0.26/component-dirs/index.html
index 65f8f6799b..d241c073d2 100644
--- a/gems/dry-system/0.26/component-dirs/index.html
+++ b/gems/dry-system/0.26/component-dirs/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

+});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

You can configure one or more component dirs:

class Application < Dry::System::Container
diff --git a/gems/dry-system/0.26/component-dirs/index.html.gz b/gems/dry-system/0.26/component-dirs/index.html.gz
index 77a7840b21..63820c0420 100644
Binary files a/gems/dry-system/0.26/component-dirs/index.html.gz and b/gems/dry-system/0.26/component-dirs/index.html.gz differ
diff --git a/gems/dry-system/0.26/container/index.html b/gems/dry-system/0.26/container/index.html
index 4478a5af14..c1091f1f42 100644
--- a/gems/dry-system/0.26/container/index.html
+++ b/gems/dry-system/0.26/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system/container'
diff --git a/gems/dry-system/0.26/container/index.html.gz b/gems/dry-system/0.26/container/index.html.gz
index b1120599d4..9dafd7ad04 100644
Binary files a/gems/dry-system/0.26/container/index.html.gz and b/gems/dry-system/0.26/container/index.html.gz differ
diff --git a/gems/dry-system/0.26/dependency-auto-injection/index.html b/gems/dry-system/0.26/dependency-auto-injection/index.html
index 4cf20e02f9..5e4e08235c 100644
--- a/gems/dry-system/0.26/dependency-auto-injection/index.html
+++ b/gems/dry-system/0.26/dependency-auto-injection/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Dependency auto-injection

After defining your container, you can use its auto-injector as a mixin to declare a component's dependencies using their container keys.

+});

Dependency auto-injection

After defining your container, you can use its auto-injector as a mixin to declare a component's dependencies using their container keys.

For example, if you have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/0.26/dependency-auto-injection/index.html.gz b/gems/dry-system/0.26/dependency-auto-injection/index.html.gz
index b0e319601d..8bce2822b2 100644
Binary files a/gems/dry-system/0.26/dependency-auto-injection/index.html.gz and b/gems/dry-system/0.26/dependency-auto-injection/index.html.gz differ
diff --git a/gems/dry-system/0.26/external-provider-sources/index.html b/gems/dry-system/0.26/external-provider-sources/index.html
index 0fbad01174..2a7c26de49 100644
--- a/gems/dry-system/0.26/external-provider-sources/index.html
+++ b/gems/dry-system/0.26/external-provider-sources/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

External provider sources

You can distribute your own components to other dry-system users via external provider sources, which can be used as the basis for providers within any dry-system container.

+});

External provider sources

You can distribute your own components to other dry-system users via external provider sources, which can be used as the basis for providers within any dry-system container.

Provider sources look and work the same as regular providers, which means allowing you to use their full lifecycle for creating, configuring, and registering your components.

diff --git a/gems/dry-system/0.26/external-provider-sources/index.html.gz b/gems/dry-system/0.26/external-provider-sources/index.html.gz index 604baec7c8..6587da8fd6 100644 Binary files a/gems/dry-system/0.26/external-provider-sources/index.html.gz and b/gems/dry-system/0.26/external-provider-sources/index.html.gz differ diff --git a/gems/dry-system/0.26/index.html b/gems/dry-system/0.26/index.html index e28b686cf7..f6f881b3ab 100644 --- a/gems/dry-system/0.26/index.html +++ b/gems/dry-system/0.26/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/0.26/index.html.gz b/gems/dry-system/0.26/index.html.gz index f9282e0db4..a186d7376d 100644 Binary files a/gems/dry-system/0.26/index.html.gz and b/gems/dry-system/0.26/index.html.gz differ diff --git a/gems/dry-system/0.26/plugins/index.html b/gems/dry-system/0.26/plugins/index.html index 6f7fa878df..3588b3c706 100644 --- a/gems/dry-system/0.26/plugins/index.html +++ b/gems/dry-system/0.26/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Providers

Some components can be large, stateful, or requiring specific configuration as part of their setup (such as when dealing with third party code). You can use providers to manage and register these components across several distinct lifecycle steps.

+});

Providers

Some components can be large, stateful, or requiring specific configuration as part of their setup (such as when dealing with third party code). You can use providers to manage and register these components across several distinct lifecycle steps.

You can define your providers as individual source files in system/providers/, for example:

# system/providers/persistence.rb
diff --git a/gems/dry-system/0.26/providers/index.html.gz b/gems/dry-system/0.26/providers/index.html.gz
index 13e5a6935e..b877dde225 100644
Binary files a/gems/dry-system/0.26/providers/index.html.gz and b/gems/dry-system/0.26/providers/index.html.gz differ
diff --git a/gems/dry-system/0.26/settings/index.html b/gems/dry-system/0.26/settings/index.html
index 538813eace..ad4430d823 100644
--- a/gems/dry-system/0.26/settings/index.html
+++ b/gems/dry-system/0.26/settings/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Settings

Basic usage

diff --git a/gems/dry-system/0.26/settings/index.html.gz b/gems/dry-system/0.26/settings/index.html.gz index 0cc200cb7a..13bc891a5c 100644 Binary files a/gems/dry-system/0.26/settings/index.html.gz and b/gems/dry-system/0.26/settings/index.html.gz differ diff --git a/gems/dry-system/0.26/test-mode/index.html b/gems/dry-system/0.26/test-mode/index.html index 208a55ac44..9023b38346 100644 --- a/gems/dry-system/0.26/test-mode/index.html +++ b/gems/dry-system/0.26/test-mode/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system/container'
 
diff --git a/gems/dry-system/0.26/test-mode/index.html.gz b/gems/dry-system/0.26/test-mode/index.html.gz
index 594226412d..171dc3e411 100644
Binary files a/gems/dry-system/0.26/test-mode/index.html.gz and b/gems/dry-system/0.26/test-mode/index.html.gz differ
diff --git a/gems/dry-system/0.27/component-dirs/index.html b/gems/dry-system/0.27/component-dirs/index.html
index d1b77a8f92..c43ebaa210 100644
--- a/gems/dry-system/0.27/component-dirs/index.html
+++ b/gems/dry-system/0.27/component-dirs/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

+});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

You can configure one or more component dirs:

class Application < Dry::System::Container
diff --git a/gems/dry-system/0.27/component-dirs/index.html.gz b/gems/dry-system/0.27/component-dirs/index.html.gz
index 610c47b3f7..b3df875727 100644
Binary files a/gems/dry-system/0.27/component-dirs/index.html.gz and b/gems/dry-system/0.27/component-dirs/index.html.gz differ
diff --git a/gems/dry-system/0.27/container/index.html b/gems/dry-system/0.27/container/index.html
index a88022ef51..6e49fa65d3 100644
--- a/gems/dry-system/0.27/container/index.html
+++ b/gems/dry-system/0.27/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system/container'
diff --git a/gems/dry-system/0.27/container/index.html.gz b/gems/dry-system/0.27/container/index.html.gz
index e40ca60d29..8b70ff9a80 100644
Binary files a/gems/dry-system/0.27/container/index.html.gz and b/gems/dry-system/0.27/container/index.html.gz differ
diff --git a/gems/dry-system/0.27/dependency-auto-injection/index.html b/gems/dry-system/0.27/dependency-auto-injection/index.html
index 5cac38209f..98f4316ea7 100644
--- a/gems/dry-system/0.27/dependency-auto-injection/index.html
+++ b/gems/dry-system/0.27/dependency-auto-injection/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Dependency auto-injection

After defining your container, you can use its auto-injector as a mixin to declare a component's dependencies using their container keys.

+});

Dependency auto-injection

After defining your container, you can use its auto-injector as a mixin to declare a component's dependencies using their container keys.

For example, if you have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/0.27/dependency-auto-injection/index.html.gz b/gems/dry-system/0.27/dependency-auto-injection/index.html.gz
index 338af1a10d..3c30c09925 100644
Binary files a/gems/dry-system/0.27/dependency-auto-injection/index.html.gz and b/gems/dry-system/0.27/dependency-auto-injection/index.html.gz differ
diff --git a/gems/dry-system/0.27/external-provider-sources/index.html b/gems/dry-system/0.27/external-provider-sources/index.html
index f6a1c70a86..aa06dc3121 100644
--- a/gems/dry-system/0.27/external-provider-sources/index.html
+++ b/gems/dry-system/0.27/external-provider-sources/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

External provider sources

You can distribute your own components to other dry-system users via external provider sources, which can be used as the basis for providers within any dry-system container.

+});

External provider sources

You can distribute your own components to other dry-system users via external provider sources, which can be used as the basis for providers within any dry-system container.

Provider sources look and work the same as regular providers, which means allowing you to use their full lifecycle for creating, configuring, and registering your components.

diff --git a/gems/dry-system/0.27/external-provider-sources/index.html.gz b/gems/dry-system/0.27/external-provider-sources/index.html.gz index 07ac1235fb..a630ea7b38 100644 Binary files a/gems/dry-system/0.27/external-provider-sources/index.html.gz and b/gems/dry-system/0.27/external-provider-sources/index.html.gz differ diff --git a/gems/dry-system/0.27/index.html b/gems/dry-system/0.27/index.html index 0bc1132f48..740c5a46aa 100644 --- a/gems/dry-system/0.27/index.html +++ b/gems/dry-system/0.27/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/0.27/index.html.gz b/gems/dry-system/0.27/index.html.gz index 22333caae2..e0cf26e5dc 100644 Binary files a/gems/dry-system/0.27/index.html.gz and b/gems/dry-system/0.27/index.html.gz differ diff --git a/gems/dry-system/0.27/plugins/index.html b/gems/dry-system/0.27/plugins/index.html index f05fecbd34..9b8a6f65be 100644 --- a/gems/dry-system/0.27/plugins/index.html +++ b/gems/dry-system/0.27/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Providers

Some components can be large, stateful, or requiring specific configuration as part of their setup (such as when dealing with third party code). You can use providers to manage and register these components across several distinct lifecycle steps.

+});

Providers

Some components can be large, stateful, or requiring specific configuration as part of their setup (such as when dealing with third party code). You can use providers to manage and register these components across several distinct lifecycle steps.

You can define your providers as individual source files in system/providers/, for example:

# system/providers/persistence.rb
diff --git a/gems/dry-system/0.27/providers/index.html.gz b/gems/dry-system/0.27/providers/index.html.gz
index 442b2a53f1..a1dcce7c6b 100644
Binary files a/gems/dry-system/0.27/providers/index.html.gz and b/gems/dry-system/0.27/providers/index.html.gz differ
diff --git a/gems/dry-system/0.27/settings/index.html b/gems/dry-system/0.27/settings/index.html
index 761688e450..21f41e3015 100644
--- a/gems/dry-system/0.27/settings/index.html
+++ b/gems/dry-system/0.27/settings/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Settings

Basic usage

diff --git a/gems/dry-system/0.27/settings/index.html.gz b/gems/dry-system/0.27/settings/index.html.gz index 05e56b200b..fce56faf21 100644 Binary files a/gems/dry-system/0.27/settings/index.html.gz and b/gems/dry-system/0.27/settings/index.html.gz differ diff --git a/gems/dry-system/0.27/test-mode/index.html b/gems/dry-system/0.27/test-mode/index.html index 309f881db6..9f9354249a 100644 --- a/gems/dry-system/0.27/test-mode/index.html +++ b/gems/dry-system/0.27/test-mode/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system/container'
 
diff --git a/gems/dry-system/0.27/test-mode/index.html.gz b/gems/dry-system/0.27/test-mode/index.html.gz
index 0107774e2c..0f97947234 100644
Binary files a/gems/dry-system/0.27/test-mode/index.html.gz and b/gems/dry-system/0.27/test-mode/index.html.gz differ
diff --git a/gems/dry-system/1.0/component-dirs/index.html b/gems/dry-system/1.0/component-dirs/index.html
index 55868a8da4..d67cd2c1c7 100644
--- a/gems/dry-system/1.0/component-dirs/index.html
+++ b/gems/dry-system/1.0/component-dirs/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

+});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

You can configure one or more component dirs:

class Application < Dry::System::Container
diff --git a/gems/dry-system/1.0/component-dirs/index.html.gz b/gems/dry-system/1.0/component-dirs/index.html.gz
index 5b8b396ef8..9631fb9c2c 100644
Binary files a/gems/dry-system/1.0/component-dirs/index.html.gz and b/gems/dry-system/1.0/component-dirs/index.html.gz differ
diff --git a/gems/dry-system/1.0/container/index.html b/gems/dry-system/1.0/container/index.html
index 7e1251b3df..84d9f824d9 100644
--- a/gems/dry-system/1.0/container/index.html
+++ b/gems/dry-system/1.0/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system'
diff --git a/gems/dry-system/1.0/container/index.html.gz b/gems/dry-system/1.0/container/index.html.gz
index a9f8170c0a..77efa4d0b8 100644
Binary files a/gems/dry-system/1.0/container/index.html.gz and b/gems/dry-system/1.0/container/index.html.gz differ
diff --git a/gems/dry-system/1.0/dependency-auto-injection/index.html b/gems/dry-system/1.0/dependency-auto-injection/index.html
index 066615379a..98d58ffae3 100644
--- a/gems/dry-system/1.0/dependency-auto-injection/index.html
+++ b/gems/dry-system/1.0/dependency-auto-injection/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Dependency auto-injection

After defining your container, you can use its auto-injector as a mixin to declare a component's dependencies using their container keys.

+});

Dependency auto-injection

After defining your container, you can use its auto-injector as a mixin to declare a component's dependencies using their container keys.

For example, if you have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/1.0/dependency-auto-injection/index.html.gz b/gems/dry-system/1.0/dependency-auto-injection/index.html.gz
index 1cd84f78e8..c608f1533b 100644
Binary files a/gems/dry-system/1.0/dependency-auto-injection/index.html.gz and b/gems/dry-system/1.0/dependency-auto-injection/index.html.gz differ
diff --git a/gems/dry-system/1.0/external-provider-sources/index.html b/gems/dry-system/1.0/external-provider-sources/index.html
index 7682159fe9..c159b40003 100644
--- a/gems/dry-system/1.0/external-provider-sources/index.html
+++ b/gems/dry-system/1.0/external-provider-sources/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

External provider sources

You can distribute your own components to other dry-system users via external provider sources, which can be used as the basis for providers within any dry-system container.

+});

External provider sources

You can distribute your own components to other dry-system users via external provider sources, which can be used as the basis for providers within any dry-system container.

Provider sources look and work the same as regular providers, which means allowing you to use their full lifecycle for creating, configuring, and registering your components.

diff --git a/gems/dry-system/1.0/external-provider-sources/index.html.gz b/gems/dry-system/1.0/external-provider-sources/index.html.gz index 5ff076ec6f..1905a2b06c 100644 Binary files a/gems/dry-system/1.0/external-provider-sources/index.html.gz and b/gems/dry-system/1.0/external-provider-sources/index.html.gz differ diff --git a/gems/dry-system/1.0/index.html b/gems/dry-system/1.0/index.html index 6cd0a773ad..1910b8d0b9 100644 --- a/gems/dry-system/1.0/index.html +++ b/gems/dry-system/1.0/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/1.0/index.html.gz b/gems/dry-system/1.0/index.html.gz index 4cfc20d35b..1e6ecaa5da 100644 Binary files a/gems/dry-system/1.0/index.html.gz and b/gems/dry-system/1.0/index.html.gz differ diff --git a/gems/dry-system/1.0/plugins/index.html b/gems/dry-system/1.0/plugins/index.html index be769e41ca..fa2365f41b 100644 --- a/gems/dry-system/1.0/plugins/index.html +++ b/gems/dry-system/1.0/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Providers

Some components can be large, stateful, or requiring specific configuration as part of their setup (such as when dealing with third party code). You can use providers to manage and register these components across several distinct lifecycle steps.

+});

Providers

Some components can be large, stateful, or requiring specific configuration as part of their setup (such as when dealing with third party code). You can use providers to manage and register these components across several distinct lifecycle steps.

You can define your providers as individual source files in system/providers/, for example:

# system/providers/persistence.rb
diff --git a/gems/dry-system/1.0/providers/index.html.gz b/gems/dry-system/1.0/providers/index.html.gz
index b352a8c816..d824592db4 100644
Binary files a/gems/dry-system/1.0/providers/index.html.gz and b/gems/dry-system/1.0/providers/index.html.gz differ
diff --git a/gems/dry-system/1.0/settings/index.html b/gems/dry-system/1.0/settings/index.html
index f57bb38255..60dec754dc 100644
--- a/gems/dry-system/1.0/settings/index.html
+++ b/gems/dry-system/1.0/settings/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Settings

Basic usage

diff --git a/gems/dry-system/1.0/settings/index.html.gz b/gems/dry-system/1.0/settings/index.html.gz index ead08d6b66..549222ef7c 100644 Binary files a/gems/dry-system/1.0/settings/index.html.gz and b/gems/dry-system/1.0/settings/index.html.gz differ diff --git a/gems/dry-system/1.0/test-mode/index.html b/gems/dry-system/1.0/test-mode/index.html index 7a553b7fba..24b7c56e74 100644 --- a/gems/dry-system/1.0/test-mode/index.html +++ b/gems/dry-system/1.0/test-mode/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system'
 
diff --git a/gems/dry-system/1.0/test-mode/index.html.gz b/gems/dry-system/1.0/test-mode/index.html.gz
index 22ca633b50..dce41afdfb 100644
Binary files a/gems/dry-system/1.0/test-mode/index.html.gz and b/gems/dry-system/1.0/test-mode/index.html.gz differ
diff --git a/gems/dry-system/index.html.gz b/gems/dry-system/index.html.gz
index 3cc5a979e7..b5d54a4c90 100644
Binary files a/gems/dry-system/index.html.gz and b/gems/dry-system/index.html.gz differ
diff --git a/gems/dry-system/main/component-dirs/index.html b/gems/dry-system/main/component-dirs/index.html
index ae4377276f..ae131c75bc 100644
--- a/gems/dry-system/main/component-dirs/index.html
+++ b/gems/dry-system/main/component-dirs/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

+});

Component dirs

The container auto-registers its components from one or more component dirs, the directories holding the Ruby source files for your classes.

You can configure one or more component dirs:

class Application < Dry::System::Container
diff --git a/gems/dry-system/main/component-dirs/index.html.gz b/gems/dry-system/main/component-dirs/index.html.gz
index af68448944..a3b187d5a9 100644
Binary files a/gems/dry-system/main/component-dirs/index.html.gz and b/gems/dry-system/main/component-dirs/index.html.gz differ
diff --git a/gems/dry-system/main/container/index.html b/gems/dry-system/main/container/index.html
index a6f79843e8..6eb7d24c51 100644
--- a/gems/dry-system/main/container/index.html
+++ b/gems/dry-system/main/container/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

+});

Container

The main API of dry-system is the abstract container that you inherit from. It allows you to configure basic settings and exposes APIs for requiring files easily. Container is the entry point to your application, and it encapsulates application's state.

Let's say you want to define an application container that will provide a logger:

require 'dry/system'
diff --git a/gems/dry-system/main/container/index.html.gz b/gems/dry-system/main/container/index.html.gz
index 490e55cf1f..6485caf51a 100644
Binary files a/gems/dry-system/main/container/index.html.gz and b/gems/dry-system/main/container/index.html.gz differ
diff --git a/gems/dry-system/main/dependency-auto-injection/index.html b/gems/dry-system/main/dependency-auto-injection/index.html
index 72e8c3a816..c1e2ae0f03 100644
--- a/gems/dry-system/main/dependency-auto-injection/index.html
+++ b/gems/dry-system/main/dependency-auto-injection/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Dependency auto-injection

After defining your container, you can use its auto-injector as a mixin to declare a component's dependencies using their container keys.

+});

Dependency auto-injection

After defining your container, you can use its auto-injector as a mixin to declare a component's dependencies using their container keys.

For example, if you have an Application container and an object that will need a logger:

# system/import.rb
diff --git a/gems/dry-system/main/dependency-auto-injection/index.html.gz b/gems/dry-system/main/dependency-auto-injection/index.html.gz
index 2e9b995e02..dd506dc887 100644
Binary files a/gems/dry-system/main/dependency-auto-injection/index.html.gz and b/gems/dry-system/main/dependency-auto-injection/index.html.gz differ
diff --git a/gems/dry-system/main/external-provider-sources/index.html b/gems/dry-system/main/external-provider-sources/index.html
index b0b0b76638..605d2628a2 100644
--- a/gems/dry-system/main/external-provider-sources/index.html
+++ b/gems/dry-system/main/external-provider-sources/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

External provider sources

You can distribute your own components to other dry-system users via external provider sources, which can be used as the basis for providers within any dry-system container.

+});

External provider sources

You can distribute your own components to other dry-system users via external provider sources, which can be used as the basis for providers within any dry-system container.

Provider sources look and work the same as regular providers, which means allowing you to use their full lifecycle for creating, configuring, and registering your components.

diff --git a/gems/dry-system/main/external-provider-sources/index.html.gz b/gems/dry-system/main/external-provider-sources/index.html.gz index 96205ebccc..d6fdcc125f 100644 Binary files a/gems/dry-system/main/external-provider-sources/index.html.gz and b/gems/dry-system/main/external-provider-sources/index.html.gz differ diff --git a/gems/dry-system/main/index.html b/gems/dry-system/main/index.html index b33914f101..2960f063f8 100644 --- a/gems/dry-system/main/index.html +++ b/gems/dry-system/main/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

+});

Introduction

Object dependency management system based on dry-container and dry-auto_inject allowing you to configure reusable components in any environment, set up their load-paths, require needed files and instantiate objects automatically with the ability to have them injected as dependencies.

This library relies on very basic mechanisms provided by Ruby, specifically require and managing $LOAD_PATH. It doesn't use magic like automatic const resolution, it's pretty much the opposite and forces you to be explicit about dependencies in your applications.

diff --git a/gems/dry-system/main/index.html.gz b/gems/dry-system/main/index.html.gz index 41215280fb..2e1590513d 100644 Binary files a/gems/dry-system/main/index.html.gz and b/gems/dry-system/main/index.html.gz differ diff --git a/gems/dry-system/main/plugins/index.html b/gems/dry-system/main/plugins/index.html index 14a4b52358..f8c5e1c436 100644 --- a/gems/dry-system/main/plugins/index.html +++ b/gems/dry-system/main/plugins/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Plugins

dry-system has already built-in plugins that you can enable, and it’s very easy to write your own.

+});

Providers

Some components can be large, stateful, or requiring specific configuration as part of their setup (such as when dealing with third party code). You can use providers to manage and register these components across several distinct lifecycle steps.

+});

Providers

Some components can be large, stateful, or requiring specific configuration as part of their setup (such as when dealing with third party code). You can use providers to manage and register these components across several distinct lifecycle steps.

You can define your providers as individual source files in system/providers/, for example:

# system/providers/persistence.rb
diff --git a/gems/dry-system/main/providers/index.html.gz b/gems/dry-system/main/providers/index.html.gz
index 200b83519f..7b40e2d04d 100644
Binary files a/gems/dry-system/main/providers/index.html.gz and b/gems/dry-system/main/providers/index.html.gz differ
diff --git a/gems/dry-system/main/settings/index.html b/gems/dry-system/main/settings/index.html
index 47cc745c18..a7dd1a0e54 100644
--- a/gems/dry-system/main/settings/index.html
+++ b/gems/dry-system/main/settings/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Settings

Basic usage

diff --git a/gems/dry-system/main/settings/index.html.gz b/gems/dry-system/main/settings/index.html.gz index 8b7631f7e0..a0f4fd0344 100644 Binary files a/gems/dry-system/main/settings/index.html.gz and b/gems/dry-system/main/settings/index.html.gz differ diff --git a/gems/dry-system/main/test-mode/index.html b/gems/dry-system/main/test-mode/index.html index ee7398f617..ff4a7c8640 100644 --- a/gems/dry-system/main/test-mode/index.html +++ b/gems/dry-system/main/test-mode/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, +});

Test Mode

In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode, in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.

require 'dry/system'
 
diff --git a/gems/dry-system/main/test-mode/index.html.gz b/gems/dry-system/main/test-mode/index.html.gz
index 97fbb1c36a..0d68b7eac5 100644
Binary files a/gems/dry-system/main/test-mode/index.html.gz and b/gems/dry-system/main/test-mode/index.html.gz differ
diff --git a/gems/dry-transaction/0.1/around-steps/index.html b/gems/dry-transaction/0.1/around-steps/index.html
index bbfde8767d..c0721fda25 100644
--- a/gems/dry-transaction/0.1/around-steps/index.html
+++ b/gems/dry-transaction/0.1/around-steps/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Around steps

Regular step operations take an input, act on it, and return an output to pass to the next step. They operate in sequence, with control being passed from one operation to the next.

+});

Around steps

Regular step operations take an input, act on it, and return an output to pass to the next step. They operate in sequence, with control being passed from one operation to the next.

Sometimes, a step operation needs to wrap all of the subsequent steps. A common case for this is handling database transactions. An operation providing a database transaction across steps needs to wrap around all the subsequent operations so it can roll back the transaction in case one of the operations failures.

diff --git a/gems/dry-transaction/0.1/around-steps/index.html.gz b/gems/dry-transaction/0.1/around-steps/index.html.gz index a430fc6d32..fbeb0e715f 100644 Binary files a/gems/dry-transaction/0.1/around-steps/index.html.gz and b/gems/dry-transaction/0.1/around-steps/index.html.gz differ diff --git a/gems/dry-transaction/0.1/basic-usage/index.html b/gems/dry-transaction/0.1/basic-usage/index.html index 2723c493ee..12a90aa32e 100644 --- a/gems/dry-transaction/0.1/basic-usage/index.html +++ b/gems/dry-transaction/0.1/basic-usage/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Basic usage

Defining a transaction with local operations

diff --git a/gems/dry-transaction/0.1/basic-usage/index.html.gz b/gems/dry-transaction/0.1/basic-usage/index.html.gz index 40f0786ad1..245e4836ec 100644 Binary files a/gems/dry-transaction/0.1/basic-usage/index.html.gz and b/gems/dry-transaction/0.1/basic-usage/index.html.gz differ diff --git a/gems/dry-transaction/0.1/custom-step-adapters/index.html b/gems/dry-transaction/0.1/custom-step-adapters/index.html index 383baeb627..bb13a0690a 100644 --- a/gems/dry-transaction/0.1/custom-step-adapters/index.html +++ b/gems/dry-transaction/0.1/custom-step-adapters/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom step adapters

You can provide your own step adapters to add custom behaviour to transaction steps. Your step adapters must provide a single #call(step, input, *args) method, which should return the step’s result wrapped in a Result object.

+});

Custom step adapters

You can provide your own step adapters to add custom behaviour to transaction steps. Your step adapters must provide a single #call(step, input, *args) method, which should return the step’s result wrapped in a Result object.

You can provide your step adapter in a few different ways. You can add it to the built-in StepAdapters container (a dry-container) to make it available to all transactions in your codebase:

Dry::Transaction::StepAdapters.register :custom_adapter, MyAdapter.new
diff --git a/gems/dry-transaction/0.1/custom-step-adapters/index.html.gz b/gems/dry-transaction/0.1/custom-step-adapters/index.html.gz
index 56fdf66fae..bd5582cd2b 100644
Binary files a/gems/dry-transaction/0.1/custom-step-adapters/index.html.gz and b/gems/dry-transaction/0.1/custom-step-adapters/index.html.gz differ
diff --git a/gems/dry-transaction/0.1/index.html b/gems/dry-transaction/0.1/index.html
index 40672ebbac..1d54fa3e1f 100644
--- a/gems/dry-transaction/0.1/index.html
+++ b/gems/dry-transaction/0.1/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-transaction is a business transaction DSL. It provides a simple way to define a complex business transaction that includes processing over many steps and by many different objects. It makes error handling a primary concern by taking a “Railway Oriented Programming” approach to capturing and returning errors from any step in the transaction.

+});

Introduction

dry-transaction is a business transaction DSL. It provides a simple way to define a complex business transaction that includes processing over many steps and by many different objects. It makes error handling a primary concern by taking a “Railway Oriented Programming” approach to capturing and returning errors from any step in the transaction.

dry-transaction is based on the following ideas:

diff --git a/gems/dry-transaction/0.1/index.html.gz b/gems/dry-transaction/0.1/index.html.gz index 5cd30fb7ed..f07bf795e3 100644 Binary files a/gems/dry-transaction/0.1/index.html.gz and b/gems/dry-transaction/0.1/index.html.gz differ diff --git a/gems/dry-transaction/0.1/injecting-operations/index.html b/gems/dry-transaction/0.1/injecting-operations/index.html index 93e7cbe326..8671add534 100644 --- a/gems/dry-transaction/0.1/injecting-operations/index.html +++ b/gems/dry-transaction/0.1/injecting-operations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Injecting operations

You can inject operation objects into transactions to adjust their behavior at runtime. This could be helpful to substitute operations with test doubles to simulate various conditions in testing.

+});

Injecting operations

You can inject operation objects into transactions to adjust their behavior at runtime. This could be helpful to substitute operations with test doubles to simulate various conditions in testing.

You can inject operation objects for both ”external” steps (defined using with:, pointing to a container registration), as well as “internal” steps (backed by instance methods only).

diff --git a/gems/dry-transaction/0.1/injecting-operations/index.html.gz b/gems/dry-transaction/0.1/injecting-operations/index.html.gz index 8c18e6873f..d7f6fce445 100644 Binary files a/gems/dry-transaction/0.1/injecting-operations/index.html.gz and b/gems/dry-transaction/0.1/injecting-operations/index.html.gz differ diff --git a/gems/dry-transaction/0.1/step-adapters/index.html b/gems/dry-transaction/0.1/step-adapters/index.html index d67ca4c1de..3e3ee94feb 100644 --- a/gems/dry-transaction/0.1/step-adapters/index.html +++ b/gems/dry-transaction/0.1/step-adapters/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Step adapters

step adds operations to your transaction that already return a Result object. If you have to work with other types of operations, you can use an alternative step adapter. Step adapters can wrap the output of your operations to make them easier to integrate into a transaction. The following adapters are available:

+});

Step adapters

step adds operations to your transaction that already return a Result object. If you have to work with other types of operations, you can use an alternative step adapter. Step adapters can wrap the output of your operations to make them easier to integrate into a transaction. The following adapters are available:

  • map – any output is considered successful and returned as Success(output)
  • diff --git a/gems/dry-transaction/0.1/step-adapters/index.html.gz b/gems/dry-transaction/0.1/step-adapters/index.html.gz index ccb6310dd3..40f2fa4999 100644 Binary files a/gems/dry-transaction/0.1/step-adapters/index.html.gz and b/gems/dry-transaction/0.1/step-adapters/index.html.gz differ diff --git a/gems/dry-transaction/0.1/step-notifications/index.html b/gems/dry-transaction/0.1/step-notifications/index.html index bea7039801..4cda731539 100644 --- a/gems/dry-transaction/0.1/step-notifications/index.html +++ b/gems/dry-transaction/0.1/step-notifications/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Step notifications

As well as matching on the final transaction result, you can subscribe to individual steps and trigger specific behaviors based on their success or failure.

+});

Step notifications

As well as matching on the final transaction result, you can subscribe to individual steps and trigger specific behaviors based on their success or failure.

You can subscribe to events from specific steps using #subscribe(step_name: listener), or subscribe to all steps via #subscribe(listener).

diff --git a/gems/dry-transaction/0.1/step-notifications/index.html.gz b/gems/dry-transaction/0.1/step-notifications/index.html.gz index 4a82366817..6e4fa187cb 100644 Binary files a/gems/dry-transaction/0.1/step-notifications/index.html.gz and b/gems/dry-transaction/0.1/step-notifications/index.html.gz differ diff --git a/gems/dry-transaction/0.1/wrapping-operations/index.html b/gems/dry-transaction/0.1/wrapping-operations/index.html index 9613bbbd40..0745ac6ec1 100644 --- a/gems/dry-transaction/0.1/wrapping-operations/index.html +++ b/gems/dry-transaction/0.1/wrapping-operations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Wrapping operations

For transactions using operations in a container, you can wrap those operations with instance methods. This is helpful for adjusting the behavior of various operations to better suit the overall flow of your transaction.

+});

Wrapping operations

For transactions using operations in a container, you can wrap those operations with instance methods. This is helpful for adjusting the behavior of various operations to better suit the overall flow of your transaction.

To wrap an operation, define an instance method with the same name as a step, and call super to invoke the original operation.

class CreateUser
diff --git a/gems/dry-transaction/0.1/wrapping-operations/index.html.gz b/gems/dry-transaction/0.1/wrapping-operations/index.html.gz
index ed098bf946..3972c0faf2 100644
Binary files a/gems/dry-transaction/0.1/wrapping-operations/index.html.gz and b/gems/dry-transaction/0.1/wrapping-operations/index.html.gz differ
diff --git a/gems/dry-transaction/0.13/around-steps/index.html b/gems/dry-transaction/0.13/around-steps/index.html
index ccc722187d..dd6f10024a 100644
--- a/gems/dry-transaction/0.13/around-steps/index.html
+++ b/gems/dry-transaction/0.13/around-steps/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

dry-transaction 0.13

Around steps

Regular step operations take an input, act on it, and return an output to pass to the next step. They operate in sequence, with control being passed from one operation to the next.

+});

dry-transaction 0.13

Around steps

Regular step operations take an input, act on it, and return an output to pass to the next step. They operate in sequence, with control being passed from one operation to the next.

Sometimes, a step operation needs to wrap all of the subsequent steps. A common case for this is handling database transactions. An operation providing a database transaction across steps needs to wrap around all the subsequent operations so it can roll back the transaction in case one of the operations failures.

diff --git a/gems/dry-transaction/0.13/around-steps/index.html.gz b/gems/dry-transaction/0.13/around-steps/index.html.gz index 214c34bebc..52adc683a8 100644 Binary files a/gems/dry-transaction/0.13/around-steps/index.html.gz and b/gems/dry-transaction/0.13/around-steps/index.html.gz differ diff --git a/gems/dry-transaction/0.13/basic-usage/index.html b/gems/dry-transaction/0.13/basic-usage/index.html index 9cf6bb71cf..4e424f8d31 100644 --- a/gems/dry-transaction/0.13/basic-usage/index.html +++ b/gems/dry-transaction/0.13/basic-usage/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction 0.13

dry-transaction 0.13

Basic usage

Defining a transaction with local operations

diff --git a/gems/dry-transaction/0.13/basic-usage/index.html.gz b/gems/dry-transaction/0.13/basic-usage/index.html.gz index 8fb2592744..1b22ac8054 100644 Binary files a/gems/dry-transaction/0.13/basic-usage/index.html.gz and b/gems/dry-transaction/0.13/basic-usage/index.html.gz differ diff --git a/gems/dry-transaction/0.13/custom-step-adapters/index.html b/gems/dry-transaction/0.13/custom-step-adapters/index.html index 770ba0ec1a..45a288377e 100644 --- a/gems/dry-transaction/0.13/custom-step-adapters/index.html +++ b/gems/dry-transaction/0.13/custom-step-adapters/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction 0.13

Custom step adapters

You can provide your own step adapters to add custom behaviour to transaction steps. Your step adapters must provide a single #call(step, input, *args) method, which should return the step’s result wrapped in a Result object.

+});

dry-transaction 0.13

Custom step adapters

You can provide your own step adapters to add custom behaviour to transaction steps. Your step adapters must provide a single #call(step, input, *args) method, which should return the step’s result wrapped in a Result object.

You can provide your step adapter in a few different ways. You can add it to the built-in StepAdapters container (a dry-container) to make it available to all transactions in your codebase:

Dry::Transaction::StepAdapters.register :custom_adapter, MyAdapter.new
diff --git a/gems/dry-transaction/0.13/custom-step-adapters/index.html.gz b/gems/dry-transaction/0.13/custom-step-adapters/index.html.gz
index b0a5d662f1..269f700c1a 100644
Binary files a/gems/dry-transaction/0.13/custom-step-adapters/index.html.gz and b/gems/dry-transaction/0.13/custom-step-adapters/index.html.gz differ
diff --git a/gems/dry-transaction/0.13/index.html b/gems/dry-transaction/0.13/index.html
index e71b77dff4..bbeb5bc1ce 100644
--- a/gems/dry-transaction/0.13/index.html
+++ b/gems/dry-transaction/0.13/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

dry-transaction 0.13

Introduction

dry-transaction is a business transaction DSL. It provides a simple way to define a complex business transaction that includes processing over many steps and by many different objects. It makes error handling a primary concern by taking a “Railway Oriented Programming” approach to capturing and returning errors from any step in the transaction.

+});

dry-transaction 0.13

Introduction

dry-transaction is a business transaction DSL. It provides a simple way to define a complex business transaction that includes processing over many steps and by many different objects. It makes error handling a primary concern by taking a “Railway Oriented Programming” approach to capturing and returning errors from any step in the transaction.

dry-transaction is based on the following ideas:

diff --git a/gems/dry-transaction/0.13/index.html.gz b/gems/dry-transaction/0.13/index.html.gz index 22ad06eff1..6ca4a01f9c 100644 Binary files a/gems/dry-transaction/0.13/index.html.gz and b/gems/dry-transaction/0.13/index.html.gz differ diff --git a/gems/dry-transaction/0.13/injecting-operations/index.html b/gems/dry-transaction/0.13/injecting-operations/index.html index 9a4fb6f961..9709231b06 100644 --- a/gems/dry-transaction/0.13/injecting-operations/index.html +++ b/gems/dry-transaction/0.13/injecting-operations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction 0.13

Injecting operations

You can inject operation objects into transactions to adjust their behavior at runtime. This could be helpful to substitute operations with test doubles to simulate various conditions in testing.

+});

dry-transaction 0.13

Injecting operations

You can inject operation objects into transactions to adjust their behavior at runtime. This could be helpful to substitute operations with test doubles to simulate various conditions in testing.

You can inject operation objects for both ”external” steps (defined using with:, pointing to a container registration), as well as “internal” steps (backed by instance methods only).

diff --git a/gems/dry-transaction/0.13/injecting-operations/index.html.gz b/gems/dry-transaction/0.13/injecting-operations/index.html.gz index 7a5b18c086..7cd774b73e 100644 Binary files a/gems/dry-transaction/0.13/injecting-operations/index.html.gz and b/gems/dry-transaction/0.13/injecting-operations/index.html.gz differ diff --git a/gems/dry-transaction/0.13/step-adapters/index.html b/gems/dry-transaction/0.13/step-adapters/index.html index 5b74100542..4bdef70670 100644 --- a/gems/dry-transaction/0.13/step-adapters/index.html +++ b/gems/dry-transaction/0.13/step-adapters/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction 0.13

Step adapters

step adds operations to your transaction that already return a Result object. If you have to work with other types of operations, you can use an alternative step adapter. Step adapters can wrap the output of your operations to make them easier to integrate into a transaction. The following adapters are available:

+});

dry-transaction 0.13

Step adapters

step adds operations to your transaction that already return a Result object. If you have to work with other types of operations, you can use an alternative step adapter. Step adapters can wrap the output of your operations to make them easier to integrate into a transaction. The following adapters are available:

  • map – any output is considered successful and returned as Success(output)
  • diff --git a/gems/dry-transaction/0.13/step-adapters/index.html.gz b/gems/dry-transaction/0.13/step-adapters/index.html.gz index 441cf86de9..6ccfecd989 100644 Binary files a/gems/dry-transaction/0.13/step-adapters/index.html.gz and b/gems/dry-transaction/0.13/step-adapters/index.html.gz differ diff --git a/gems/dry-transaction/0.13/step-notifications/index.html b/gems/dry-transaction/0.13/step-notifications/index.html index 71c2a0e0a2..a279fa6218 100644 --- a/gems/dry-transaction/0.13/step-notifications/index.html +++ b/gems/dry-transaction/0.13/step-notifications/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction 0.13

Step notifications

As well as matching on the final transaction result, you can subscribe to individual steps and trigger specific behaviors based on their success or failure.

+});

dry-transaction 0.13

Step notifications

As well as matching on the final transaction result, you can subscribe to individual steps and trigger specific behaviors based on their success or failure.

You can subscribe to events from specific steps using #subscribe(step_name: listener), or subscribe to all steps via #subscribe(listener).

diff --git a/gems/dry-transaction/0.13/step-notifications/index.html.gz b/gems/dry-transaction/0.13/step-notifications/index.html.gz index 3e8fdebb04..ee1d2b5b17 100644 Binary files a/gems/dry-transaction/0.13/step-notifications/index.html.gz and b/gems/dry-transaction/0.13/step-notifications/index.html.gz differ diff --git a/gems/dry-transaction/0.13/wrapping-operations/index.html b/gems/dry-transaction/0.13/wrapping-operations/index.html index 38da78eac6..107eaf505d 100644 --- a/gems/dry-transaction/0.13/wrapping-operations/index.html +++ b/gems/dry-transaction/0.13/wrapping-operations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction 0.13

Wrapping operations

For transactions using operations in a container, you can wrap those operations with instance methods. This is helpful for adjusting the behavior of various operations to better suit the overall flow of your transaction.

+});

dry-transaction 0.13

Wrapping operations

For transactions using operations in a container, you can wrap those operations with instance methods. This is helpful for adjusting the behavior of various operations to better suit the overall flow of your transaction.

To wrap an operation, define an instance method with the same name as a step, and call super to invoke the original operation.

class CreateUser
diff --git a/gems/dry-transaction/0.13/wrapping-operations/index.html.gz b/gems/dry-transaction/0.13/wrapping-operations/index.html.gz
index d213ef1ee4..7ebc4ca000 100644
Binary files a/gems/dry-transaction/0.13/wrapping-operations/index.html.gz and b/gems/dry-transaction/0.13/wrapping-operations/index.html.gz differ
diff --git a/gems/dry-transaction/0.14/around-steps/index.html b/gems/dry-transaction/0.14/around-steps/index.html
index 85a7ef8ad8..a56029227b 100644
--- a/gems/dry-transaction/0.14/around-steps/index.html
+++ b/gems/dry-transaction/0.14/around-steps/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

dry-transaction 0.14

Around steps

Regular step operations take an input, act on it, and return an output to pass to the next step. They operate in sequence, with control being passed from one operation to the next.

+});

dry-transaction 0.14

Around steps

Regular step operations take an input, act on it, and return an output to pass to the next step. They operate in sequence, with control being passed from one operation to the next.

Sometimes, a step operation needs to wrap all of the subsequent steps. A common case for this is handling database transactions. An operation providing a database transaction across steps needs to wrap around all the subsequent operations so it can roll back the transaction in case one of the operations failures.

diff --git a/gems/dry-transaction/0.14/around-steps/index.html.gz b/gems/dry-transaction/0.14/around-steps/index.html.gz index e26403789b..1d6a709bd4 100644 Binary files a/gems/dry-transaction/0.14/around-steps/index.html.gz and b/gems/dry-transaction/0.14/around-steps/index.html.gz differ diff --git a/gems/dry-transaction/0.14/basic-usage/index.html b/gems/dry-transaction/0.14/basic-usage/index.html index a57fc22840..5d0d66a9a5 100644 --- a/gems/dry-transaction/0.14/basic-usage/index.html +++ b/gems/dry-transaction/0.14/basic-usage/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction 0.14

dry-transaction 0.14

Basic usage

Defining a transaction with local operations

diff --git a/gems/dry-transaction/0.14/basic-usage/index.html.gz b/gems/dry-transaction/0.14/basic-usage/index.html.gz index 2cb848804f..8039137fbe 100644 Binary files a/gems/dry-transaction/0.14/basic-usage/index.html.gz and b/gems/dry-transaction/0.14/basic-usage/index.html.gz differ diff --git a/gems/dry-transaction/0.14/custom-step-adapters/index.html b/gems/dry-transaction/0.14/custom-step-adapters/index.html index a2f609287e..95dba29b6d 100644 --- a/gems/dry-transaction/0.14/custom-step-adapters/index.html +++ b/gems/dry-transaction/0.14/custom-step-adapters/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction 0.14

Custom step adapters

You can provide your own step adapters to add custom behaviour to transaction steps. Your step adapters must provide a single #call(step, input, *args) method, which should return the step’s result wrapped in a Result object.

+});

dry-transaction 0.14

Custom step adapters

You can provide your own step adapters to add custom behaviour to transaction steps. Your step adapters must provide a single #call(step, input, *args) method, which should return the step’s result wrapped in a Result object.

You can provide your step adapter in a few different ways. You can add it to the built-in StepAdapters container (a dry-container) to make it available to all transactions in your codebase:

Dry::Transaction::StepAdapters.register :custom_adapter, MyAdapter.new
diff --git a/gems/dry-transaction/0.14/custom-step-adapters/index.html.gz b/gems/dry-transaction/0.14/custom-step-adapters/index.html.gz
index 2ba86b1eb6..9b9a88de54 100644
Binary files a/gems/dry-transaction/0.14/custom-step-adapters/index.html.gz and b/gems/dry-transaction/0.14/custom-step-adapters/index.html.gz differ
diff --git a/gems/dry-transaction/0.14/index.html b/gems/dry-transaction/0.14/index.html
index 0ba5a0bd1f..e9bc4660d9 100644
--- a/gems/dry-transaction/0.14/index.html
+++ b/gems/dry-transaction/0.14/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

dry-transaction 0.14

Introduction

dry-transaction is a business transaction DSL. It provides a simple way to define a complex business transaction that includes processing over many steps and by many different objects. It makes error handling a primary concern by taking a “Railway Oriented Programming” approach to capturing and returning errors from any step in the transaction.

+});

dry-transaction 0.14

Introduction

dry-transaction is a business transaction DSL. It provides a simple way to define a complex business transaction that includes processing over many steps and by many different objects. It makes error handling a primary concern by taking a “Railway Oriented Programming” approach to capturing and returning errors from any step in the transaction.

dry-transaction is based on the following ideas:

diff --git a/gems/dry-transaction/0.14/index.html.gz b/gems/dry-transaction/0.14/index.html.gz index 81f8e397c5..8550a8785d 100644 Binary files a/gems/dry-transaction/0.14/index.html.gz and b/gems/dry-transaction/0.14/index.html.gz differ diff --git a/gems/dry-transaction/0.14/injecting-operations/index.html b/gems/dry-transaction/0.14/injecting-operations/index.html index cb3775f4e0..cedf41c966 100644 --- a/gems/dry-transaction/0.14/injecting-operations/index.html +++ b/gems/dry-transaction/0.14/injecting-operations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction 0.14

Injecting operations

You can inject operation objects into transactions to adjust their behavior at runtime. This could be helpful to substitute operations with test doubles to simulate various conditions in testing.

+});

dry-transaction 0.14

Injecting operations

You can inject operation objects into transactions to adjust their behavior at runtime. This could be helpful to substitute operations with test doubles to simulate various conditions in testing.

You can inject operation objects for both ”external” steps (defined using with:, pointing to a container registration), as well as “internal” steps (backed by instance methods only).

diff --git a/gems/dry-transaction/0.14/injecting-operations/index.html.gz b/gems/dry-transaction/0.14/injecting-operations/index.html.gz index 6e1debec13..357fc296cd 100644 Binary files a/gems/dry-transaction/0.14/injecting-operations/index.html.gz and b/gems/dry-transaction/0.14/injecting-operations/index.html.gz differ diff --git a/gems/dry-transaction/0.14/step-adapters/index.html b/gems/dry-transaction/0.14/step-adapters/index.html index e14b14bbd4..a8ad6ef160 100644 --- a/gems/dry-transaction/0.14/step-adapters/index.html +++ b/gems/dry-transaction/0.14/step-adapters/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction 0.14

Step adapters

step adds operations to your transaction that already return a Result object. If you have to work with other types of operations, you can use an alternative step adapter. Step adapters can wrap the output of your operations to make them easier to integrate into a transaction. The following adapters are available:

+});

dry-transaction 0.14

Step adapters

step adds operations to your transaction that already return a Result object. If you have to work with other types of operations, you can use an alternative step adapter. Step adapters can wrap the output of your operations to make them easier to integrate into a transaction. The following adapters are available:

  • map – any output is considered successful and returned as Success(output)
  • diff --git a/gems/dry-transaction/0.14/step-adapters/index.html.gz b/gems/dry-transaction/0.14/step-adapters/index.html.gz index 85cea4264c..e41cd03617 100644 Binary files a/gems/dry-transaction/0.14/step-adapters/index.html.gz and b/gems/dry-transaction/0.14/step-adapters/index.html.gz differ diff --git a/gems/dry-transaction/0.14/step-notifications/index.html b/gems/dry-transaction/0.14/step-notifications/index.html index f263c96b58..4c0207f4e8 100644 --- a/gems/dry-transaction/0.14/step-notifications/index.html +++ b/gems/dry-transaction/0.14/step-notifications/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction 0.14

Step notifications

As well as matching on the final transaction result, you can subscribe to individual steps and trigger specific behaviors based on their success or failure.

+});

dry-transaction 0.14

Step notifications

As well as matching on the final transaction result, you can subscribe to individual steps and trigger specific behaviors based on their success or failure.

You can subscribe to events from specific steps using #subscribe(step_name: listener), or subscribe to all steps via #subscribe(listener).

diff --git a/gems/dry-transaction/0.14/step-notifications/index.html.gz b/gems/dry-transaction/0.14/step-notifications/index.html.gz index 31985abe68..661808d4e1 100644 Binary files a/gems/dry-transaction/0.14/step-notifications/index.html.gz and b/gems/dry-transaction/0.14/step-notifications/index.html.gz differ diff --git a/gems/dry-transaction/0.14/wrapping-operations/index.html b/gems/dry-transaction/0.14/wrapping-operations/index.html index ecbc0aff89..7c6cf21fc8 100644 --- a/gems/dry-transaction/0.14/wrapping-operations/index.html +++ b/gems/dry-transaction/0.14/wrapping-operations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction 0.14

Wrapping operations

For transactions using operations in a container, you can wrap those operations with instance methods. This is helpful for adjusting the behavior of various operations to better suit the overall flow of your transaction.

+});

dry-transaction 0.14

Wrapping operations

For transactions using operations in a container, you can wrap those operations with instance methods. This is helpful for adjusting the behavior of various operations to better suit the overall flow of your transaction.

To wrap an operation, define an instance method with the same name as a step, and call super to invoke the original operation.

class CreateUser
diff --git a/gems/dry-transaction/0.14/wrapping-operations/index.html.gz b/gems/dry-transaction/0.14/wrapping-operations/index.html.gz
index 179131281f..69590cbd61 100644
Binary files a/gems/dry-transaction/0.14/wrapping-operations/index.html.gz and b/gems/dry-transaction/0.14/wrapping-operations/index.html.gz differ
diff --git a/gems/dry-transaction/0.15/around-steps/index.html b/gems/dry-transaction/0.15/around-steps/index.html
index 8f3e7de503..b841550673 100644
--- a/gems/dry-transaction/0.15/around-steps/index.html
+++ b/gems/dry-transaction/0.15/around-steps/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

dry-transaction 0.15

Around steps

Regular step operations take an input, act on it, and return an output to pass to the next step. They operate in sequence, with control being passed from one operation to the next.

+});

dry-transaction 0.15

Around steps

Regular step operations take an input, act on it, and return an output to pass to the next step. They operate in sequence, with control being passed from one operation to the next.

Sometimes, a step operation needs to wrap all of the subsequent steps. A common case for this is handling database transactions. An operation providing a database transaction across steps needs to wrap around all the subsequent operations so it can roll back the transaction in case one of the operations failures.

diff --git a/gems/dry-transaction/0.15/around-steps/index.html.gz b/gems/dry-transaction/0.15/around-steps/index.html.gz index e2a22f7be7..c4874d86f9 100644 Binary files a/gems/dry-transaction/0.15/around-steps/index.html.gz and b/gems/dry-transaction/0.15/around-steps/index.html.gz differ diff --git a/gems/dry-transaction/0.15/basic-usage/index.html b/gems/dry-transaction/0.15/basic-usage/index.html index eae28ece75..3352963459 100644 --- a/gems/dry-transaction/0.15/basic-usage/index.html +++ b/gems/dry-transaction/0.15/basic-usage/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction 0.15

dry-transaction 0.15

Basic usage

Defining a transaction with local operations

diff --git a/gems/dry-transaction/0.15/basic-usage/index.html.gz b/gems/dry-transaction/0.15/basic-usage/index.html.gz index 7434873341..7a78dc072b 100644 Binary files a/gems/dry-transaction/0.15/basic-usage/index.html.gz and b/gems/dry-transaction/0.15/basic-usage/index.html.gz differ diff --git a/gems/dry-transaction/0.15/custom-step-adapters/index.html b/gems/dry-transaction/0.15/custom-step-adapters/index.html index f6368ec9a2..96ba0b52ff 100644 --- a/gems/dry-transaction/0.15/custom-step-adapters/index.html +++ b/gems/dry-transaction/0.15/custom-step-adapters/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction 0.15

Custom step adapters

You can provide your own step adapters to add custom behaviour to transaction steps. Your step adapters must provide a single #call(step, input, *args) method, which should return the step’s result wrapped in a Result object.

+});

dry-transaction 0.15

Custom step adapters

You can provide your own step adapters to add custom behaviour to transaction steps. Your step adapters must provide a single #call(step, input, *args) method, which should return the step’s result wrapped in a Result object.

You can provide your step adapter in a few different ways. You can add it to the built-in StepAdapters container (a dry-container) to make it available to all transactions in your codebase:

Dry::Transaction::StepAdapters.register :custom_adapter, MyAdapter.new
diff --git a/gems/dry-transaction/0.15/custom-step-adapters/index.html.gz b/gems/dry-transaction/0.15/custom-step-adapters/index.html.gz
index fae65102ed..01d50ccac1 100644
Binary files a/gems/dry-transaction/0.15/custom-step-adapters/index.html.gz and b/gems/dry-transaction/0.15/custom-step-adapters/index.html.gz differ
diff --git a/gems/dry-transaction/0.15/index.html b/gems/dry-transaction/0.15/index.html
index 0a07c8b959..715d2d58e8 100644
--- a/gems/dry-transaction/0.15/index.html
+++ b/gems/dry-transaction/0.15/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

dry-transaction 0.15

Introduction

dry-transaction is a business transaction DSL. It provides a simple way to define a complex business transaction that includes processing over many steps and by many different objects. It makes error handling a primary concern by taking a “Railway Oriented Programming” approach to capturing and returning errors from any step in the transaction.

+});

dry-transaction 0.15

Introduction

dry-transaction is a business transaction DSL. It provides a simple way to define a complex business transaction that includes processing over many steps and by many different objects. It makes error handling a primary concern by taking a “Railway Oriented Programming” approach to capturing and returning errors from any step in the transaction.

dry-transaction is based on the following ideas:

diff --git a/gems/dry-transaction/0.15/index.html.gz b/gems/dry-transaction/0.15/index.html.gz index 6872956e6b..2fb9d93124 100644 Binary files a/gems/dry-transaction/0.15/index.html.gz and b/gems/dry-transaction/0.15/index.html.gz differ diff --git a/gems/dry-transaction/0.15/injecting-operations/index.html b/gems/dry-transaction/0.15/injecting-operations/index.html index f09b8458b3..e606ad655a 100644 --- a/gems/dry-transaction/0.15/injecting-operations/index.html +++ b/gems/dry-transaction/0.15/injecting-operations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction 0.15

Injecting operations

You can inject operation objects into transactions to adjust their behavior at runtime. This could be helpful to substitute operations with test doubles to simulate various conditions in testing.

+});

dry-transaction 0.15

Injecting operations

You can inject operation objects into transactions to adjust their behavior at runtime. This could be helpful to substitute operations with test doubles to simulate various conditions in testing.

You can inject operation objects for both ”external” steps (defined using with:, pointing to a container registration), as well as “internal” steps (backed by instance methods only).

diff --git a/gems/dry-transaction/0.15/injecting-operations/index.html.gz b/gems/dry-transaction/0.15/injecting-operations/index.html.gz index f155984248..e869f45805 100644 Binary files a/gems/dry-transaction/0.15/injecting-operations/index.html.gz and b/gems/dry-transaction/0.15/injecting-operations/index.html.gz differ diff --git a/gems/dry-transaction/0.15/step-adapters/index.html b/gems/dry-transaction/0.15/step-adapters/index.html index 0863514f1c..a3066235ff 100644 --- a/gems/dry-transaction/0.15/step-adapters/index.html +++ b/gems/dry-transaction/0.15/step-adapters/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction 0.15

Step adapters

step adds operations to your transaction that already return a Result object. If you have to work with other types of operations, you can use an alternative step adapter. Step adapters can wrap the output of your operations to make them easier to integrate into a transaction. The following adapters are available:

+});

dry-transaction 0.15

Step adapters

step adds operations to your transaction that already return a Result object. If you have to work with other types of operations, you can use an alternative step adapter. Step adapters can wrap the output of your operations to make them easier to integrate into a transaction. The following adapters are available:

  • map – any output is considered successful and returned as Success(output)
  • diff --git a/gems/dry-transaction/0.15/step-adapters/index.html.gz b/gems/dry-transaction/0.15/step-adapters/index.html.gz index 2eeca4177e..8ecef1f3c2 100644 Binary files a/gems/dry-transaction/0.15/step-adapters/index.html.gz and b/gems/dry-transaction/0.15/step-adapters/index.html.gz differ diff --git a/gems/dry-transaction/0.15/step-notifications/index.html b/gems/dry-transaction/0.15/step-notifications/index.html index 91cad495f5..e9b2d99a69 100644 --- a/gems/dry-transaction/0.15/step-notifications/index.html +++ b/gems/dry-transaction/0.15/step-notifications/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction 0.15

Step notifications

As well as matching on the final transaction result, you can subscribe to individual steps and trigger specific behaviors based on their success or failure.

+});

dry-transaction 0.15

Step notifications

As well as matching on the final transaction result, you can subscribe to individual steps and trigger specific behaviors based on their success or failure.

You can subscribe to events from specific steps using #subscribe(step_name: listener), or subscribe to all steps via #subscribe(listener).

diff --git a/gems/dry-transaction/0.15/step-notifications/index.html.gz b/gems/dry-transaction/0.15/step-notifications/index.html.gz index 165f64ee18..93bafdc0e5 100644 Binary files a/gems/dry-transaction/0.15/step-notifications/index.html.gz and b/gems/dry-transaction/0.15/step-notifications/index.html.gz differ diff --git a/gems/dry-transaction/0.15/wrapping-operations/index.html b/gems/dry-transaction/0.15/wrapping-operations/index.html index 82bfaa7146..df40842610 100644 --- a/gems/dry-transaction/0.15/wrapping-operations/index.html +++ b/gems/dry-transaction/0.15/wrapping-operations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction 0.15

Wrapping operations

For transactions using operations in a container, you can wrap those operations with instance methods. This is helpful for adjusting the behavior of various operations to better suit the overall flow of your transaction.

+});

dry-transaction 0.15

Wrapping operations

For transactions using operations in a container, you can wrap those operations with instance methods. This is helpful for adjusting the behavior of various operations to better suit the overall flow of your transaction.

To wrap an operation, define an instance method with the same name as a step, and call super to invoke the original operation.

class CreateUser
diff --git a/gems/dry-transaction/0.15/wrapping-operations/index.html.gz b/gems/dry-transaction/0.15/wrapping-operations/index.html.gz
index 5e80167d32..9dc38e5659 100644
Binary files a/gems/dry-transaction/0.15/wrapping-operations/index.html.gz and b/gems/dry-transaction/0.15/wrapping-operations/index.html.gz differ
diff --git a/gems/dry-transaction/index.html.gz b/gems/dry-transaction/index.html.gz
index b95eb5790c..4c14406bf7 100644
Binary files a/gems/dry-transaction/index.html.gz and b/gems/dry-transaction/index.html.gz differ
diff --git a/gems/dry-transaction/main/around-steps/index.html b/gems/dry-transaction/main/around-steps/index.html
index 1f19ed3924..4c6f9b0eef 100644
--- a/gems/dry-transaction/main/around-steps/index.html
+++ b/gems/dry-transaction/main/around-steps/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

dry-transaction main

Around steps

Regular step operations take an input, act on it, and return an output to pass to the next step. They operate in sequence, with control being passed from one operation to the next.

+});

dry-transaction main

Around steps

Regular step operations take an input, act on it, and return an output to pass to the next step. They operate in sequence, with control being passed from one operation to the next.

Sometimes, a step operation needs to wrap all of the subsequent steps. A common case for this is handling database transactions. An operation providing a database transaction across steps needs to wrap around all the subsequent operations so it can roll back the transaction in case one of the operations failures.

diff --git a/gems/dry-transaction/main/around-steps/index.html.gz b/gems/dry-transaction/main/around-steps/index.html.gz index f35b8d6159..bac411d4b1 100644 Binary files a/gems/dry-transaction/main/around-steps/index.html.gz and b/gems/dry-transaction/main/around-steps/index.html.gz differ diff --git a/gems/dry-transaction/main/basic-usage/index.html b/gems/dry-transaction/main/basic-usage/index.html index 18fbd1b904..f4c02d6ae0 100644 --- a/gems/dry-transaction/main/basic-usage/index.html +++ b/gems/dry-transaction/main/basic-usage/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction main

dry-transaction main

Basic usage

Defining a transaction with local operations

diff --git a/gems/dry-transaction/main/basic-usage/index.html.gz b/gems/dry-transaction/main/basic-usage/index.html.gz index 38c3f48164..f8599bbc58 100644 Binary files a/gems/dry-transaction/main/basic-usage/index.html.gz and b/gems/dry-transaction/main/basic-usage/index.html.gz differ diff --git a/gems/dry-transaction/main/custom-step-adapters/index.html b/gems/dry-transaction/main/custom-step-adapters/index.html index 7be21c52f6..7bbfd81254 100644 --- a/gems/dry-transaction/main/custom-step-adapters/index.html +++ b/gems/dry-transaction/main/custom-step-adapters/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction main

Custom step adapters

You can provide your own step adapters to add custom behaviour to transaction steps. Your step adapters must provide a single #call(step, input, *args) method, which should return the step’s result wrapped in a Result object.

+});

dry-transaction main

Custom step adapters

You can provide your own step adapters to add custom behaviour to transaction steps. Your step adapters must provide a single #call(step, input, *args) method, which should return the step’s result wrapped in a Result object.

You can provide your step adapter in a few different ways. You can add it to the built-in StepAdapters container (a dry-container) to make it available to all transactions in your codebase:

Dry::Transaction::StepAdapters.register :custom_adapter, MyAdapter.new
diff --git a/gems/dry-transaction/main/custom-step-adapters/index.html.gz b/gems/dry-transaction/main/custom-step-adapters/index.html.gz
index 43f1ae19b1..74ff8d513a 100644
Binary files a/gems/dry-transaction/main/custom-step-adapters/index.html.gz and b/gems/dry-transaction/main/custom-step-adapters/index.html.gz differ
diff --git a/gems/dry-transaction/main/index.html b/gems/dry-transaction/main/index.html
index d77698c5af..f4c0fba5a4 100644
--- a/gems/dry-transaction/main/index.html
+++ b/gems/dry-transaction/main/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

dry-transaction main

Introduction

dry-transaction is a business transaction DSL. It provides a simple way to define a complex business transaction that includes processing over many steps and by many different objects. It makes error handling a primary concern by taking a “Railway Oriented Programming” approach to capturing and returning errors from any step in the transaction.

+});

dry-transaction main

Introduction

dry-transaction is a business transaction DSL. It provides a simple way to define a complex business transaction that includes processing over many steps and by many different objects. It makes error handling a primary concern by taking a “Railway Oriented Programming” approach to capturing and returning errors from any step in the transaction.

dry-transaction is based on the following ideas:

diff --git a/gems/dry-transaction/main/index.html.gz b/gems/dry-transaction/main/index.html.gz index 7a162066d1..1a399ef459 100644 Binary files a/gems/dry-transaction/main/index.html.gz and b/gems/dry-transaction/main/index.html.gz differ diff --git a/gems/dry-transaction/main/injecting-operations/index.html b/gems/dry-transaction/main/injecting-operations/index.html index 364b9035c5..d4a15ce9cc 100644 --- a/gems/dry-transaction/main/injecting-operations/index.html +++ b/gems/dry-transaction/main/injecting-operations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction main

Injecting operations

You can inject operation objects into transactions to adjust their behavior at runtime. This could be helpful to substitute operations with test doubles to simulate various conditions in testing.

+});

dry-transaction main

Injecting operations

You can inject operation objects into transactions to adjust their behavior at runtime. This could be helpful to substitute operations with test doubles to simulate various conditions in testing.

You can inject operation objects for both ”external” steps (defined using with:, pointing to a container registration), as well as “internal” steps (backed by instance methods only).

diff --git a/gems/dry-transaction/main/injecting-operations/index.html.gz b/gems/dry-transaction/main/injecting-operations/index.html.gz index ed91ab4695..9f9e928716 100644 Binary files a/gems/dry-transaction/main/injecting-operations/index.html.gz and b/gems/dry-transaction/main/injecting-operations/index.html.gz differ diff --git a/gems/dry-transaction/main/step-adapters/index.html b/gems/dry-transaction/main/step-adapters/index.html index f0b29be095..1e8b2c077f 100644 --- a/gems/dry-transaction/main/step-adapters/index.html +++ b/gems/dry-transaction/main/step-adapters/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction main

Step adapters

step adds operations to your transaction that already return a Result object. If you have to work with other types of operations, you can use an alternative step adapter. Step adapters can wrap the output of your operations to make them easier to integrate into a transaction. The following adapters are available:

+});

dry-transaction main

Step adapters

step adds operations to your transaction that already return a Result object. If you have to work with other types of operations, you can use an alternative step adapter. Step adapters can wrap the output of your operations to make them easier to integrate into a transaction. The following adapters are available:

  • map – any output is considered successful and returned as Success(output)
  • diff --git a/gems/dry-transaction/main/step-adapters/index.html.gz b/gems/dry-transaction/main/step-adapters/index.html.gz index 45a0ad2171..bbbba91557 100644 Binary files a/gems/dry-transaction/main/step-adapters/index.html.gz and b/gems/dry-transaction/main/step-adapters/index.html.gz differ diff --git a/gems/dry-transaction/main/step-notifications/index.html b/gems/dry-transaction/main/step-notifications/index.html index f60de4f25d..c990a96ec5 100644 --- a/gems/dry-transaction/main/step-notifications/index.html +++ b/gems/dry-transaction/main/step-notifications/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction main

Step notifications

As well as matching on the final transaction result, you can subscribe to individual steps and trigger specific behaviors based on their success or failure.

+});

dry-transaction main

Step notifications

As well as matching on the final transaction result, you can subscribe to individual steps and trigger specific behaviors based on their success or failure.

You can subscribe to events from specific steps using #subscribe(step_name: listener), or subscribe to all steps via #subscribe(listener).

diff --git a/gems/dry-transaction/main/step-notifications/index.html.gz b/gems/dry-transaction/main/step-notifications/index.html.gz index ab4ad89064..d2a8d90839 100644 Binary files a/gems/dry-transaction/main/step-notifications/index.html.gz and b/gems/dry-transaction/main/step-notifications/index.html.gz differ diff --git a/gems/dry-transaction/main/wrapping-operations/index.html b/gems/dry-transaction/main/wrapping-operations/index.html index 36fc533987..f292fb5512 100644 --- a/gems/dry-transaction/main/wrapping-operations/index.html +++ b/gems/dry-transaction/main/wrapping-operations/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transaction main

Wrapping operations

For transactions using operations in a container, you can wrap those operations with instance methods. This is helpful for adjusting the behavior of various operations to better suit the overall flow of your transaction.

+});

dry-transaction main

Wrapping operations

For transactions using operations in a container, you can wrap those operations with instance methods. This is helpful for adjusting the behavior of various operations to better suit the overall flow of your transaction.

To wrap an operation, define an instance method with the same name as a step, and call super to invoke the original operation.

class CreateUser
diff --git a/gems/dry-transaction/main/wrapping-operations/index.html.gz b/gems/dry-transaction/main/wrapping-operations/index.html.gz
index 5bff332dd1..e89ca5f53b 100644
Binary files a/gems/dry-transaction/main/wrapping-operations/index.html.gz and b/gems/dry-transaction/main/wrapping-operations/index.html.gz differ
diff --git a/gems/dry-transformer/0.1/built-in-transformations/index.html b/gems/dry-transformer/0.1/built-in-transformations/index.html
index 2db8552b19..7d2c75e54a 100644
--- a/gems/dry-transformer/0.1/built-in-transformations/index.html
+++ b/gems/dry-transformer/0.1/built-in-transformations/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in transformation

dry-transformer comes with a lot of built-in functions. They come in the form of modules with class methods, which you can import into a registry:

+});

Built-in transformation

dry-transformer comes with a lot of built-in functions. They come in the form of modules with class methods, which you can import into a registry:

  • Coercions
  • diff --git a/gems/dry-transformer/0.1/built-in-transformations/index.html.gz b/gems/dry-transformer/0.1/built-in-transformations/index.html.gz index c3929e5968..c37e093de9 100644 Binary files a/gems/dry-transformer/0.1/built-in-transformations/index.html.gz and b/gems/dry-transformer/0.1/built-in-transformations/index.html.gz differ diff --git a/gems/dry-transformer/0.1/index.html b/gems/dry-transformer/0.1/index.html index f0087d7200..5235692c2d 100644 --- a/gems/dry-transformer/0.1/index.html +++ b/gems/dry-transformer/0.1/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-transformer is a library that allows you to compose procs into a functional pipeline using left-to-right function composition.

+});

Introduction

dry-transformer is a library that allows you to compose procs into a functional pipeline using left-to-right function composition.

The approach came from Functional Programming, where simple functions are composed into more complex functions in order to transform some data. It works like |> in Elixir or >> in F#. dry-transformer provides a mechanism to define and compose transformations, along with a number of built-in transformations.

octocatEdit on GitHub

\ No newline at end of file diff --git a/gems/dry-transformer/0.1/index.html.gz b/gems/dry-transformer/0.1/index.html.gz index 250174f3a1..6fd1ca6f45 100644 Binary files a/gems/dry-transformer/0.1/index.html.gz and b/gems/dry-transformer/0.1/index.html.gz differ diff --git a/gems/dry-transformer/0.1/transformation-objects/index.html b/gems/dry-transformer/0.1/transformation-objects/index.html index 0268e0cee5..65e18ea4cd 100644 --- a/gems/dry-transformer/0.1/transformation-objects/index.html +++ b/gems/dry-transformer/0.1/transformation-objects/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Transformation objects

You can define transformation classes using the DSL which converts every method call to its corresponding transformation, and composes these transformations into a transformation pipeline. Here's a simple example:

+});

Transformation objects

You can define transformation classes using the DSL which converts every method call to its corresponding transformation, and composes these transformations into a transformation pipeline. Here's a simple example:

class MyMapper < Dry::Transformer::Pipe
   import Dry::Transformer::ArrayTransformations
   import Dry::Transformer::HashTransformations
diff --git a/gems/dry-transformer/0.1/transformation-objects/index.html.gz b/gems/dry-transformer/0.1/transformation-objects/index.html.gz
index 3394dac681..8594ccf000 100644
Binary files a/gems/dry-transformer/0.1/transformation-objects/index.html.gz and b/gems/dry-transformer/0.1/transformation-objects/index.html.gz differ
diff --git a/gems/dry-transformer/0.1/using-standalone-functions/index.html b/gems/dry-transformer/0.1/using-standalone-functions/index.html
index e09a572c4e..ac82774956 100644
--- a/gems/dry-transformer/0.1/using-standalone-functions/index.html
+++ b/gems/dry-transformer/0.1/using-standalone-functions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Using standalone functions

You can use dry-transformer and its function registry feature stand-alone, without the need to define transformation classes. To do so, simply define a module and extend it with the registry API:

+});

Using standalone functions

You can use dry-transformer and its function registry feature stand-alone, without the need to define transformation classes. To do so, simply define a module and extend it with the registry API:

require 'json'
 require 'dry/transformer/all'
 
diff --git a/gems/dry-transformer/0.1/using-standalone-functions/index.html.gz b/gems/dry-transformer/0.1/using-standalone-functions/index.html.gz
index d997000f47..6c192f5442 100644
Binary files a/gems/dry-transformer/0.1/using-standalone-functions/index.html.gz and b/gems/dry-transformer/0.1/using-standalone-functions/index.html.gz differ
diff --git a/gems/dry-transformer/1.0/built-in-transformations/index.html b/gems/dry-transformer/1.0/built-in-transformations/index.html
index 4c7cf4d84f..98bf4b230e 100644
--- a/gems/dry-transformer/1.0/built-in-transformations/index.html
+++ b/gems/dry-transformer/1.0/built-in-transformations/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in transformation

dry-transformer comes with a lot of built-in functions. They come in the form of modules with class methods, which you can import into a registry:

+});

Built-in transformation

dry-transformer comes with a lot of built-in functions. They come in the form of modules with class methods, which you can import into a registry:

  • Coercions
  • diff --git a/gems/dry-transformer/1.0/built-in-transformations/index.html.gz b/gems/dry-transformer/1.0/built-in-transformations/index.html.gz index 4df9a7dd16..601981efee 100644 Binary files a/gems/dry-transformer/1.0/built-in-transformations/index.html.gz and b/gems/dry-transformer/1.0/built-in-transformations/index.html.gz differ diff --git a/gems/dry-transformer/1.0/index.html b/gems/dry-transformer/1.0/index.html index 0431698dda..43fbbd923c 100644 --- a/gems/dry-transformer/1.0/index.html +++ b/gems/dry-transformer/1.0/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-transformer is a library that allows you to compose procs into a functional pipeline using left-to-right function composition.

+});

Introduction

dry-transformer is a library that allows you to compose procs into a functional pipeline using left-to-right function composition.

The approach came from Functional Programming, where simple functions are composed into more complex functions in order to transform some data. It works like |> in Elixir or >> in F#. dry-transformer provides a mechanism to define and compose transformations, along with a number of built-in transformations.

octocatEdit on GitHub

\ No newline at end of file diff --git a/gems/dry-transformer/1.0/index.html.gz b/gems/dry-transformer/1.0/index.html.gz index e607ccfb91..e850f96709 100644 Binary files a/gems/dry-transformer/1.0/index.html.gz and b/gems/dry-transformer/1.0/index.html.gz differ diff --git a/gems/dry-transformer/1.0/transformation-objects/index.html b/gems/dry-transformer/1.0/transformation-objects/index.html index 353787359f..5a18caa08a 100644 --- a/gems/dry-transformer/1.0/transformation-objects/index.html +++ b/gems/dry-transformer/1.0/transformation-objects/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Transformation objects

You can define transformation classes using the DSL which converts every method call to its corresponding transformation, and composes these transformations into a transformation pipeline. Here's a simple example:

+});

Transformation objects

You can define transformation classes using the DSL which converts every method call to its corresponding transformation, and composes these transformations into a transformation pipeline. Here's a simple example:

class MyMapper < Dry::Transformer::Pipe
   import Dry::Transformer::ArrayTransformations
   import Dry::Transformer::HashTransformations
diff --git a/gems/dry-transformer/1.0/transformation-objects/index.html.gz b/gems/dry-transformer/1.0/transformation-objects/index.html.gz
index 813724e996..86e2a47216 100644
Binary files a/gems/dry-transformer/1.0/transformation-objects/index.html.gz and b/gems/dry-transformer/1.0/transformation-objects/index.html.gz differ
diff --git a/gems/dry-transformer/1.0/using-standalone-functions/index.html b/gems/dry-transformer/1.0/using-standalone-functions/index.html
index 040cd6e254..88f6b73e65 100644
--- a/gems/dry-transformer/1.0/using-standalone-functions/index.html
+++ b/gems/dry-transformer/1.0/using-standalone-functions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Using standalone functions

You can use dry-transformer and its function registry feature stand-alone, without the need to define transformation classes. To do so, simply define a module and extend it with the registry API:

+});

Using standalone functions

You can use dry-transformer and its function registry feature stand-alone, without the need to define transformation classes. To do so, simply define a module and extend it with the registry API:

require 'json'
 require 'dry/transformer/all'
 
diff --git a/gems/dry-transformer/1.0/using-standalone-functions/index.html.gz b/gems/dry-transformer/1.0/using-standalone-functions/index.html.gz
index 287b8b6e12..46826fa210 100644
Binary files a/gems/dry-transformer/1.0/using-standalone-functions/index.html.gz and b/gems/dry-transformer/1.0/using-standalone-functions/index.html.gz differ
diff --git a/gems/dry-transformer/index.html.gz b/gems/dry-transformer/index.html.gz
index 3afdf34e74..3b6c3d18a5 100644
Binary files a/gems/dry-transformer/index.html.gz and b/gems/dry-transformer/index.html.gz differ
diff --git a/gems/dry-transformer/main/built-in-transformations/index.html b/gems/dry-transformer/main/built-in-transformations/index.html
index d0d4391755..fe3339a880 100644
--- a/gems/dry-transformer/main/built-in-transformations/index.html
+++ b/gems/dry-transformer/main/built-in-transformations/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

dry-transformer main

Built-in transformation

dry-transformer comes with a lot of built-in functions. They come in the form of modules with class methods, which you can import into a registry:

+});

dry-transformer main

Built-in transformation

dry-transformer comes with a lot of built-in functions. They come in the form of modules with class methods, which you can import into a registry:

  • Coercions
  • diff --git a/gems/dry-transformer/main/built-in-transformations/index.html.gz b/gems/dry-transformer/main/built-in-transformations/index.html.gz index cf586354b7..e0d6497f7f 100644 Binary files a/gems/dry-transformer/main/built-in-transformations/index.html.gz and b/gems/dry-transformer/main/built-in-transformations/index.html.gz differ diff --git a/gems/dry-transformer/main/index.html b/gems/dry-transformer/main/index.html index 8740cd65a2..24f0aa2936 100644 --- a/gems/dry-transformer/main/index.html +++ b/gems/dry-transformer/main/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transformer main

Introduction

dry-transformer is a library that allows you to compose procs into a functional pipeline using left-to-right function composition.

+});

dry-transformer main

Introduction

dry-transformer is a library that allows you to compose procs into a functional pipeline using left-to-right function composition.

The approach came from Functional Programming, where simple functions are composed into more complex functions in order to transform some data. It works like |> in Elixir or >> in F#. dry-transformer provides a mechanism to define and compose transformations, along with a number of built-in transformations.

octocatEdit on GitHub

\ No newline at end of file diff --git a/gems/dry-transformer/main/index.html.gz b/gems/dry-transformer/main/index.html.gz index 63215dc597..5a7eac91ef 100644 Binary files a/gems/dry-transformer/main/index.html.gz and b/gems/dry-transformer/main/index.html.gz differ diff --git a/gems/dry-transformer/main/transformation-objects/index.html b/gems/dry-transformer/main/transformation-objects/index.html index 71e88d0ae6..97a4c4950e 100644 --- a/gems/dry-transformer/main/transformation-objects/index.html +++ b/gems/dry-transformer/main/transformation-objects/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

dry-transformer main

Transformation objects

You can define transformation classes using the DSL which converts every method call to its corresponding transformation, and composes these transformations into a transformation pipeline. Here's a simple example:

+});

dry-transformer main

Transformation objects

You can define transformation classes using the DSL which converts every method call to its corresponding transformation, and composes these transformations into a transformation pipeline. Here's a simple example:

class MyMapper < Dry::Transformer::Pipe
   import Dry::Transformer::ArrayTransformations
   import Dry::Transformer::HashTransformations
diff --git a/gems/dry-transformer/main/transformation-objects/index.html.gz b/gems/dry-transformer/main/transformation-objects/index.html.gz
index b04c07feae..1d3f683af6 100644
Binary files a/gems/dry-transformer/main/transformation-objects/index.html.gz and b/gems/dry-transformer/main/transformation-objects/index.html.gz differ
diff --git a/gems/dry-transformer/main/using-standalone-functions/index.html b/gems/dry-transformer/main/using-standalone-functions/index.html
index 1c71896509..63d00c24bd 100644
--- a/gems/dry-transformer/main/using-standalone-functions/index.html
+++ b/gems/dry-transformer/main/using-standalone-functions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

dry-transformer main

Using standalone functions

You can use dry-transformer and its function registry feature stand-alone, without the need to define transformation classes. To do so, simply define a module and extend it with the registry API:

+});

dry-transformer main

Using standalone functions

You can use dry-transformer and its function registry feature stand-alone, without the need to define transformation classes. To do so, simply define a module and extend it with the registry API:

require 'json'
 require 'dry/transformer/all'
 
diff --git a/gems/dry-transformer/main/using-standalone-functions/index.html.gz b/gems/dry-transformer/main/using-standalone-functions/index.html.gz
index f1eba96d6f..47fe3aa6ef 100644
Binary files a/gems/dry-transformer/main/using-standalone-functions/index.html.gz and b/gems/dry-transformer/main/using-standalone-functions/index.html.gz differ
diff --git a/gems/dry-types/0.15/array-with-member/index.html b/gems/dry-types/0.15/array-with-member/index.html
index 26121eb4d9..53dcbf441c 100644
--- a/gems/dry-types/0.15/array-with-member/index.html
+++ b/gems/dry-types/0.15/array-with-member/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Array With Member

The built-in array type supports defining the member's type:

+});

Array With Member

The built-in array type supports defining the member's type:

PostStatuses = Types::Strict::Array.of(Types::Coercible::String)
 
 PostStatuses[[:foo, :bar]] # ["foo", "bar"]
diff --git a/gems/dry-types/0.15/array-with-member/index.html.gz b/gems/dry-types/0.15/array-with-member/index.html.gz
index 3288d7e476..22ebda307f 100644
Binary files a/gems/dry-types/0.15/array-with-member/index.html.gz and b/gems/dry-types/0.15/array-with-member/index.html.gz differ
diff --git a/gems/dry-types/0.15/built-in-types/index.html b/gems/dry-types/0.15/built-in-types/index.html
index f291128573..0412c90dc3 100644
--- a/gems/dry-types/0.15/built-in-types/index.html
+++ b/gems/dry-types/0.15/built-in-types/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in Types

Built-in types are grouped under 6 categories:

  • definition - base type definitions with primitive class and options
  • diff --git a/gems/dry-types/0.15/built-in-types/index.html.gz b/gems/dry-types/0.15/built-in-types/index.html.gz index 9d477b273a..8902082656 100644 Binary files a/gems/dry-types/0.15/built-in-types/index.html.gz and b/gems/dry-types/0.15/built-in-types/index.html.gz differ diff --git a/gems/dry-types/0.15/constraints/index.html b/gems/dry-types/0.15/constraints/index.html index 589a9cdc43..767642726d 100644 --- a/gems/dry-types/0.15/constraints/index.html +++ b/gems/dry-types/0.15/constraints/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Constraints

You can create constrained types that will use validation rules to check that the input is not violating any of the configured constraints. You can treat it as a lower level guarantee that you're not instantiating objects that are broken.

+});

Constraints

You can create constrained types that will use validation rules to check that the input is not violating any of the configured constraints. You can treat it as a lower level guarantee that you're not instantiating objects that are broken.

All types support the constraints API, but not all constraints are suitable for a particular primitive, it's up to you to set up constraints that make sense.

diff --git a/gems/dry-types/0.15/constraints/index.html.gz b/gems/dry-types/0.15/constraints/index.html.gz index 3a7278de19..cf6d3e9581 100644 Binary files a/gems/dry-types/0.15/constraints/index.html.gz and b/gems/dry-types/0.15/constraints/index.html.gz differ diff --git a/gems/dry-types/0.15/custom-types/index.html b/gems/dry-types/0.15/custom-types/index.html index 33039ea874..c9204902e5 100644 --- a/gems/dry-types/0.15/custom-types/index.html +++ b/gems/dry-types/0.15/custom-types/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom Types

There are a bunch of helpers for building your own types based on existing classes and values. These helpers are automatically defined if you're imported types in a module.

+});

Default Values

A type with a default value will return the configured value when the input is not defined:

+});

Default Values

A type with a default value will return the configured value when the input is not defined:

PostStatus = Types::Strict::String.default('draft')
 
 PostStatus[] # "draft"
diff --git a/gems/dry-types/0.15/default-values/index.html.gz b/gems/dry-types/0.15/default-values/index.html.gz
index c20e817e0d..27f5e77562 100644
Binary files a/gems/dry-types/0.15/default-values/index.html.gz and b/gems/dry-types/0.15/default-values/index.html.gz differ
diff --git a/gems/dry-types/0.15/enum/index.html b/gems/dry-types/0.15/enum/index.html
index f6bf60938f..d9a4d675e5 100644
--- a/gems/dry-types/0.15/enum/index.html
+++ b/gems/dry-types/0.15/enum/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Enum

In many cases you may want to define an enum. For example, in a blog application a post may have a finite list of statuses. Apart from accessing the current status value, it is useful to have all possible values accessible too. Furthermore, an enum can be a map from, e.g., strings to integers. This is useful for mapping externally-provided integer values to human-readable strings without explicit conversions, see examples.

+});

Enum

In many cases you may want to define an enum. For example, in a blog application a post may have a finite list of statuses. Apart from accessing the current status value, it is useful to have all possible values accessible too. Furthermore, an enum can be a map from, e.g., strings to integers. This is useful for mapping externally-provided integer values to human-readable strings without explicit conversions, see examples.

require 'dry-types'
 require 'dry-struct'
 
diff --git a/gems/dry-types/0.15/enum/index.html.gz b/gems/dry-types/0.15/enum/index.html.gz
index 4aa8854d46..f219949461 100644
Binary files a/gems/dry-types/0.15/enum/index.html.gz and b/gems/dry-types/0.15/enum/index.html.gz differ
diff --git a/gems/dry-types/0.15/hash-schemas-obsolete/index.html b/gems/dry-types/0.15/hash-schemas-obsolete/index.html
index a6fe309eaf..ec393d9685 100644
--- a/gems/dry-types/0.15/hash-schemas-obsolete/index.html
+++ b/gems/dry-types/0.15/hash-schemas-obsolete/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Hash Schemas (deprecated API)

[DEPRECATED] The following API is already removed in 0.15, use new configurable hash schemas as a replacement.

diff --git a/gems/dry-types/0.15/hash-schemas-obsolete/index.html.gz b/gems/dry-types/0.15/hash-schemas-obsolete/index.html.gz index 4bb70effc1..0e86382151 100644 Binary files a/gems/dry-types/0.15/hash-schemas-obsolete/index.html.gz and b/gems/dry-types/0.15/hash-schemas-obsolete/index.html.gz differ diff --git a/gems/dry-types/0.15/hash-schemas/index.html b/gems/dry-types/0.15/hash-schemas/index.html index bdd68f48c8..541e666b10 100644 --- a/gems/dry-types/0.15/hash-schemas/index.html +++ b/gems/dry-types/0.15/hash-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Hash Schemas

It is possible to define a type for a hash with a known set of keys and corresponding value types. Let's say you want to describe a hash containing the name and the age of a user:

+});

Hash Schemas

It is possible to define a type for a hash with a known set of keys and corresponding value types. Let's say you want to describe a hash containing the name and the age of a user:

# using simple kernel coercions
 user_hash = Types::Hash.schema(name: Types::Strict::String, age: Types::Coercible::Integer)
 
diff --git a/gems/dry-types/0.15/hash-schemas/index.html.gz b/gems/dry-types/0.15/hash-schemas/index.html.gz
index bf2b0c55a5..c09a276b94 100644
Binary files a/gems/dry-types/0.15/hash-schemas/index.html.gz and b/gems/dry-types/0.15/hash-schemas/index.html.gz differ
diff --git a/gems/dry-types/0.15/including-types/index.html b/gems/dry-types/0.15/including-types/index.html
index 7688a71989..6cdfdb9926 100644
--- a/gems/dry-types/0.15/including-types/index.html
+++ b/gems/dry-types/0.15/including-types/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Including Types

To include all built-in types in your own namespace simply do:

+});

Including Types

To include all built-in types in your own namespace simply do:

module Types
   include Dry::Types.module
 end
diff --git a/gems/dry-types/0.15/including-types/index.html.gz b/gems/dry-types/0.15/including-types/index.html.gz
index 3e77931fb1..189a75f0a4 100644
Binary files a/gems/dry-types/0.15/including-types/index.html.gz and b/gems/dry-types/0.15/including-types/index.html.gz differ
diff --git a/gems/dry-types/0.15/index.html b/gems/dry-types/0.15/index.html
index 681313b218..8ecc60408c 100644
--- a/gems/dry-types/0.15/index.html
+++ b/gems/dry-types/0.15/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-types is a simple and extendable type system for Ruby; useful for value coercions, applying constraints, defining complex structs or value objects and more. It was created as a successor to Virtus.

+});

Map

Map describes a homogeneous hashmap. This means only types of keys and values are known. You can simply imagine a map input as a list of key-value pairs.

+});

Map

Map describes a homogeneous hashmap. This means only types of keys and values are known. You can simply imagine a map input as a list of key-value pairs.

int_float_hash = Types::Hash.map(Types::Strict::Integer, Types::Strict::Float)
 int_float_hash[100 => 300.0, 42 => 70.0]
 # => {100=>300.0, 42=>70.0}
diff --git a/gems/dry-types/0.15/map/index.html.gz b/gems/dry-types/0.15/map/index.html.gz
index 629817cf96..3d32b64bec 100644
Binary files a/gems/dry-types/0.15/map/index.html.gz and b/gems/dry-types/0.15/map/index.html.gz differ
diff --git a/gems/dry-types/0.15/optional-values/index.html b/gems/dry-types/0.15/optional-values/index.html
index d20d684c62..c1206e03e7 100644
--- a/gems/dry-types/0.15/optional-values/index.html
+++ b/gems/dry-types/0.15/optional-values/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Optional Values

Optional values

diff --git a/gems/dry-types/0.15/optional-values/index.html.gz b/gems/dry-types/0.15/optional-values/index.html.gz index f57b63250d..8e87053c29 100644 Binary files a/gems/dry-types/0.15/optional-values/index.html.gz and b/gems/dry-types/0.15/optional-values/index.html.gz differ diff --git a/gems/dry-types/0.15/strict/index.html b/gems/dry-types/0.15/strict/index.html index 65359e9e13..d3ada4bf5f 100644 --- a/gems/dry-types/0.15/strict/index.html +++ b/gems/dry-types/0.15/strict/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Strict

All types in the strict category are constrained by a type-check that is applied to an input which makes sure that the input is an instance of the primitive:

+});

Strict

All types in the strict category are constrained by a type-check that is applied to an input which makes sure that the input is an instance of the primitive:

Types::Strict::Integer[1] # => 1
 Types::Strict::Integer['1'] # => raises Dry::Types::ConstraintError
 

octocatEdit on GitHub

\ No newline at end of file diff --git a/gems/dry-types/0.15/strict/index.html.gz b/gems/dry-types/0.15/strict/index.html.gz index fd4bc4afdb..8f41f43e8f 100644 Binary files a/gems/dry-types/0.15/strict/index.html.gz and b/gems/dry-types/0.15/strict/index.html.gz differ diff --git a/gems/dry-types/0.15/sum/index.html b/gems/dry-types/0.15/sum/index.html index e4450887ba..6b4168ed22 100644 --- a/gems/dry-types/0.15/sum/index.html +++ b/gems/dry-types/0.15/sum/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Sum

You can specify sum types using | operator, it is an explicit way of defining what the valid types of a value are.

+});

Sum

You can specify sum types using | operator, it is an explicit way of defining what the valid types of a value are.

For example dry-types defines the Bool type which is a sum consisting of the True and False types, expressed as Types::True | Types::False (and it has its strict version, too).

diff --git a/gems/dry-types/0.15/sum/index.html.gz b/gems/dry-types/0.15/sum/index.html.gz index ac6d67bf85..05a7b93b9c 100644 Binary files a/gems/dry-types/0.15/sum/index.html.gz and b/gems/dry-types/0.15/sum/index.html.gz differ diff --git a/gems/dry-types/1.0/array-with-member/index.html b/gems/dry-types/1.0/array-with-member/index.html index 007fa67f7a..6b295cf221 100644 --- a/gems/dry-types/1.0/array-with-member/index.html +++ b/gems/dry-types/1.0/array-with-member/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Array With Member

The built-in array type supports defining the member's type:

+});

Array With Member

The built-in array type supports defining the member's type:

PostStatuses = Types::Array.of(Types::Coercible::String)
 
 PostStatuses[[:foo, :bar]] # ["foo", "bar"]
diff --git a/gems/dry-types/1.0/array-with-member/index.html.gz b/gems/dry-types/1.0/array-with-member/index.html.gz
index 75b697525c..a923ca6e3d 100644
Binary files a/gems/dry-types/1.0/array-with-member/index.html.gz and b/gems/dry-types/1.0/array-with-member/index.html.gz differ
diff --git a/gems/dry-types/1.0/built-in-types/index.html b/gems/dry-types/1.0/built-in-types/index.html
index 4c246798d7..af212c2cba 100644
--- a/gems/dry-types/1.0/built-in-types/index.html
+++ b/gems/dry-types/1.0/built-in-types/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in Types

Built-in types are grouped under 6 categories:

+});

Built-in Types

Built-in types are grouped under 6 categories:

  • nominal - base type definitions with a primitive class and options
  • diff --git a/gems/dry-types/1.0/built-in-types/index.html.gz b/gems/dry-types/1.0/built-in-types/index.html.gz index 07b2dbf0f6..e2b72cfcd7 100644 Binary files a/gems/dry-types/1.0/built-in-types/index.html.gz and b/gems/dry-types/1.0/built-in-types/index.html.gz differ diff --git a/gems/dry-types/1.0/constraints/index.html b/gems/dry-types/1.0/constraints/index.html index df62e256a2..ab88aa08f8 100644 --- a/gems/dry-types/1.0/constraints/index.html +++ b/gems/dry-types/1.0/constraints/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Constraints

You can create constrained types that will use validation rules to check that the input is not violating any of the configured constraints. You can treat it as a lower level guarantee that you're not instantiating objects that are broken.

+});

Constraints

You can create constrained types that will use validation rules to check that the input is not violating any of the configured constraints. You can treat it as a lower level guarantee that you're not instantiating objects that are broken.

All types support the constraints API, but not all constraints are suitable for a particular primitive, it's up to you to set up constraints that make sense.

diff --git a/gems/dry-types/1.0/constraints/index.html.gz b/gems/dry-types/1.0/constraints/index.html.gz index 8f207cae41..6c23b48b36 100644 Binary files a/gems/dry-types/1.0/constraints/index.html.gz and b/gems/dry-types/1.0/constraints/index.html.gz differ diff --git a/gems/dry-types/1.0/custom-types/index.html b/gems/dry-types/1.0/custom-types/index.html index f19ed98c5f..a8ad232289 100644 --- a/gems/dry-types/1.0/custom-types/index.html +++ b/gems/dry-types/1.0/custom-types/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom Types

There are a bunch of helpers for building your own types based on existing classes and values. These helpers are automatically defined if you're imported types in a module.

+});

Default Values

A type with a default value will return the configured value when the input is not defined:

+});

Default Values

A type with a default value will return the configured value when the input is not defined:

PostStatus = Types::String.default('draft')
 
 PostStatus[] # "draft"
diff --git a/gems/dry-types/1.0/default-values/index.html.gz b/gems/dry-types/1.0/default-values/index.html.gz
index dd281c126d..e30c529098 100644
Binary files a/gems/dry-types/1.0/default-values/index.html.gz and b/gems/dry-types/1.0/default-values/index.html.gz differ
diff --git a/gems/dry-types/1.0/enum/index.html b/gems/dry-types/1.0/enum/index.html
index d1ad25a064..60cba1b6b2 100644
--- a/gems/dry-types/1.0/enum/index.html
+++ b/gems/dry-types/1.0/enum/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Enum

In many cases you may want to define an enum. For example, in a blog application a post may have a finite list of statuses. Apart from accessing the current status value, it is useful to have all possible values accessible too. Furthermore, an enum can be a map from, e.g., strings to integers. This is useful for mapping externally-provided integer values to human-readable strings without explicit conversions, see examples.

+});

Enum

In many cases you may want to define an enum. For example, in a blog application a post may have a finite list of statuses. Apart from accessing the current status value, it is useful to have all possible values accessible too. Furthermore, an enum can be a map from, e.g., strings to integers. This is useful for mapping externally-provided integer values to human-readable strings without explicit conversions, see examples.

require 'dry-types'
 require 'dry-struct'
 
diff --git a/gems/dry-types/1.0/enum/index.html.gz b/gems/dry-types/1.0/enum/index.html.gz
index 19d069b7d9..06a139cf01 100644
Binary files a/gems/dry-types/1.0/enum/index.html.gz and b/gems/dry-types/1.0/enum/index.html.gz differ
diff --git a/gems/dry-types/1.0/getting-started/index.html b/gems/dry-types/1.0/getting-started/index.html
index 70705ab7e2..eaac21ff7c 100644
--- a/gems/dry-types/1.0/getting-started/index.html
+++ b/gems/dry-types/1.0/getting-started/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Getting Started

Using Dry::Types in Your Application

diff --git a/gems/dry-types/1.0/getting-started/index.html.gz b/gems/dry-types/1.0/getting-started/index.html.gz index 673d872b2f..3946795e3e 100644 Binary files a/gems/dry-types/1.0/getting-started/index.html.gz and b/gems/dry-types/1.0/getting-started/index.html.gz differ diff --git a/gems/dry-types/1.0/hash-schemas/index.html b/gems/dry-types/1.0/hash-schemas/index.html index 2c6fcbad3a..4f513a657a 100644 --- a/gems/dry-types/1.0/hash-schemas/index.html +++ b/gems/dry-types/1.0/hash-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Hash Schemas

It is possible to define a type for a hash with a known set of keys and corresponding value types. Let's say you want to describe a hash containing the name and the age of a user:

+});

Hash Schemas

It is possible to define a type for a hash with a known set of keys and corresponding value types. Let's say you want to describe a hash containing the name and the age of a user:

# using simple kernel coercions
 user_hash = Types::Hash.schema(name: Types::String, age: Types::Coercible::Integer)
 
diff --git a/gems/dry-types/1.0/hash-schemas/index.html.gz b/gems/dry-types/1.0/hash-schemas/index.html.gz
index 579428d35f..4358b0e900 100644
Binary files a/gems/dry-types/1.0/hash-schemas/index.html.gz and b/gems/dry-types/1.0/hash-schemas/index.html.gz differ
diff --git a/gems/dry-types/1.0/index.html b/gems/dry-types/1.0/index.html
index 68211bb025..9298c87dba 100644
--- a/gems/dry-types/1.0/index.html
+++ b/gems/dry-types/1.0/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-types is a simple and extendable type system for Ruby; useful for value coercions, applying constraints, defining complex structs or value objects and more. It was created as a successor to Virtus.

+});

Map

Map describes a homogeneous hashmap. This means only types of keys and values are known. You can simply imagine a map input as a list of key-value pairs.

+});

Map

Map describes a homogeneous hashmap. This means only types of keys and values are known. You can simply imagine a map input as a list of key-value pairs.

int_float_hash = Types::Hash.map(Types::Integer, Types::Float)
 int_float_hash[100 => 300.0, 42 => 70.0]
 # => {100=>300.0, 42=>70.0}
diff --git a/gems/dry-types/1.0/map/index.html.gz b/gems/dry-types/1.0/map/index.html.gz
index f76b3d8578..b6f81c44a2 100644
Binary files a/gems/dry-types/1.0/map/index.html.gz and b/gems/dry-types/1.0/map/index.html.gz differ
diff --git a/gems/dry-types/1.0/optional-values/index.html b/gems/dry-types/1.0/optional-values/index.html
index ef50efa0d5..df09f01a42 100644
--- a/gems/dry-types/1.0/optional-values/index.html
+++ b/gems/dry-types/1.0/optional-values/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Type Attributes

Types themselves have optional attributes you can apply to get further functionality.

+});

Sum

You can specify sum types using | operator, it is an explicit way of defining what the valid types of a value are.

+});

Sum

You can specify sum types using | operator, it is an explicit way of defining what the valid types of a value are.

For example dry-types defines the Bool type which is a sum consisting of the True and False types, expressed as Types::True | Types::False.

diff --git a/gems/dry-types/1.0/sum/index.html.gz b/gems/dry-types/1.0/sum/index.html.gz index 8cdb08fd0b..326a507c12 100644 Binary files a/gems/dry-types/1.0/sum/index.html.gz and b/gems/dry-types/1.0/sum/index.html.gz differ diff --git a/gems/dry-types/1.2/array-with-member/index.html b/gems/dry-types/1.2/array-with-member/index.html index b208a71aa8..dc79c0035e 100644 --- a/gems/dry-types/1.2/array-with-member/index.html +++ b/gems/dry-types/1.2/array-with-member/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Array With Member

The built-in array type supports defining the member's type:

+});

Array With Member

The built-in array type supports defining the member's type:

PostStatuses = Types::Array.of(Types::Coercible::String)
 
 PostStatuses[[:foo, :bar]] # ["foo", "bar"]
diff --git a/gems/dry-types/1.2/array-with-member/index.html.gz b/gems/dry-types/1.2/array-with-member/index.html.gz
index 4b7b671950..4feb27e5ad 100644
Binary files a/gems/dry-types/1.2/array-with-member/index.html.gz and b/gems/dry-types/1.2/array-with-member/index.html.gz differ
diff --git a/gems/dry-types/1.2/built-in-types/index.html b/gems/dry-types/1.2/built-in-types/index.html
index b53848fc2a..e056b14a23 100644
--- a/gems/dry-types/1.2/built-in-types/index.html
+++ b/gems/dry-types/1.2/built-in-types/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in Types

Built-in types are grouped under 6 categories:

  • nominal - base type definitions with a primitive class and options
  • diff --git a/gems/dry-types/1.2/built-in-types/index.html.gz b/gems/dry-types/1.2/built-in-types/index.html.gz index eaff1a9165..3f9802390a 100644 Binary files a/gems/dry-types/1.2/built-in-types/index.html.gz and b/gems/dry-types/1.2/built-in-types/index.html.gz differ diff --git a/gems/dry-types/1.2/constraints/index.html b/gems/dry-types/1.2/constraints/index.html index 7e6b1ca9b0..3fe9d28559 100644 --- a/gems/dry-types/1.2/constraints/index.html +++ b/gems/dry-types/1.2/constraints/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Constraints

You can create constrained types that will use validation rules to check that the input is not violating any of the configured constraints. You can treat it as a lower level guarantee that you're not instantiating objects that are broken.

+});

Constraints

You can create constrained types that will use validation rules to check that the input is not violating any of the configured constraints. You can treat it as a lower level guarantee that you're not instantiating objects that are broken.

All types support the constraints API, but not all constraints are suitable for a particular primitive, it's up to you to set up constraints that make sense.

diff --git a/gems/dry-types/1.2/constraints/index.html.gz b/gems/dry-types/1.2/constraints/index.html.gz index 2947f75501..17004cdac2 100644 Binary files a/gems/dry-types/1.2/constraints/index.html.gz and b/gems/dry-types/1.2/constraints/index.html.gz differ diff --git a/gems/dry-types/1.2/custom-types/index.html b/gems/dry-types/1.2/custom-types/index.html index 1161b9bc6b..b01b58334b 100644 --- a/gems/dry-types/1.2/custom-types/index.html +++ b/gems/dry-types/1.2/custom-types/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom Types

There are a bunch of helpers for building your own types based on existing classes and values. These helpers are automatically defined if you're imported types in a module.

+});

Default Values

A type with a default value will return the configured value when the input is not defined:

+});

Default Values

A type with a default value will return the configured value when the input is not defined:

PostStatus = Types::String.default('draft')
 
 PostStatus[] # "draft"
diff --git a/gems/dry-types/1.2/default-values/index.html.gz b/gems/dry-types/1.2/default-values/index.html.gz
index 4b5e8f199d..ec963c45d6 100644
Binary files a/gems/dry-types/1.2/default-values/index.html.gz and b/gems/dry-types/1.2/default-values/index.html.gz differ
diff --git a/gems/dry-types/1.2/enum/index.html b/gems/dry-types/1.2/enum/index.html
index 9b284e0a00..b6f0c2a719 100644
--- a/gems/dry-types/1.2/enum/index.html
+++ b/gems/dry-types/1.2/enum/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Enum

In many cases you may want to define an enum. For example, in a blog application a post may have a finite list of statuses. Apart from accessing the current status value, it is useful to have all possible values accessible too. Furthermore, an enum can be a map from, e.g., strings to integers. This is useful for mapping externally-provided integer values to human-readable strings without explicit conversions, see examples.

+});

Enum

In many cases you may want to define an enum. For example, in a blog application a post may have a finite list of statuses. Apart from accessing the current status value, it is useful to have all possible values accessible too. Furthermore, an enum can be a map from, e.g., strings to integers. This is useful for mapping externally-provided integer values to human-readable strings without explicit conversions, see examples.

require 'dry-types'
 require 'dry-struct'
 
diff --git a/gems/dry-types/1.2/enum/index.html.gz b/gems/dry-types/1.2/enum/index.html.gz
index da1b4c90d7..5bcbb97860 100644
Binary files a/gems/dry-types/1.2/enum/index.html.gz and b/gems/dry-types/1.2/enum/index.html.gz differ
diff --git a/gems/dry-types/1.2/extensions/index.html b/gems/dry-types/1.2/extensions/index.html
index 30009344cd..1cee0e9a59 100644
--- a/gems/dry-types/1.2/extensions/index.html
+++ b/gems/dry-types/1.2/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-types can be extended with extension. Those extensions are loaded with Dry::Types.load_extensions.

+});

Extensions

dry-types can be extended with extension. Those extensions are loaded with Dry::Types.load_extensions.

Available extensions:

diff --git a/gems/dry-types/1.2/extensions/index.html.gz b/gems/dry-types/1.2/extensions/index.html.gz index 00062bbcca..f607933576 100644 Binary files a/gems/dry-types/1.2/extensions/index.html.gz and b/gems/dry-types/1.2/extensions/index.html.gz differ diff --git a/gems/dry-types/1.2/extensions/maybe/index.html b/gems/dry-types/1.2/extensions/maybe/index.html index 656b43dbc4..263d5d8eb1 100644 --- a/gems/dry-types/1.2/extensions/maybe/index.html +++ b/gems/dry-types/1.2/extensions/maybe/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Maybe

The dry-monads gem provides an approach to handling optional values by returning a Monad object. This allows you to pass your type to a Maybe(x) block that only executes if x returns Some or None.

+});

Maybe

The dry-monads gem provides an approach to handling optional values by returning a Monad object. This allows you to pass your type to a Maybe(x) block that only executes if x returns Some or None.

NOTE: Requires the dry-monads gem to be loaded.

diff --git a/gems/dry-types/1.2/extensions/maybe/index.html.gz b/gems/dry-types/1.2/extensions/maybe/index.html.gz index bcaae34808..d98bcff33b 100644 Binary files a/gems/dry-types/1.2/extensions/maybe/index.html.gz and b/gems/dry-types/1.2/extensions/maybe/index.html.gz differ diff --git a/gems/dry-types/1.2/extensions/monads/index.html b/gems/dry-types/1.2/extensions/monads/index.html index 92980829d0..1c3f6ba86a 100644 --- a/gems/dry-types/1.2/extensions/monads/index.html +++ b/gems/dry-types/1.2/extensions/monads/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Monads

The monads extension makes Dry::Types::Result objects compatible with dry-monads.

+});

Monads

The monads extension makes Dry::Types::Result objects compatible with dry-monads.

To enable the extension:

require 'dry/types'
diff --git a/gems/dry-types/1.2/extensions/monads/index.html.gz b/gems/dry-types/1.2/extensions/monads/index.html.gz
index 806e9809e5..571b61f651 100644
Binary files a/gems/dry-types/1.2/extensions/monads/index.html.gz and b/gems/dry-types/1.2/extensions/monads/index.html.gz differ
diff --git a/gems/dry-types/1.2/getting-started/index.html b/gems/dry-types/1.2/getting-started/index.html
index 7b28be81a3..3290f07d50 100644
--- a/gems/dry-types/1.2/getting-started/index.html
+++ b/gems/dry-types/1.2/getting-started/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Getting Started

Using Dry::Types in Your Application

diff --git a/gems/dry-types/1.2/getting-started/index.html.gz b/gems/dry-types/1.2/getting-started/index.html.gz index b6e819d3e4..98da63cd59 100644 Binary files a/gems/dry-types/1.2/getting-started/index.html.gz and b/gems/dry-types/1.2/getting-started/index.html.gz differ diff --git a/gems/dry-types/1.2/hash-schemas/index.html b/gems/dry-types/1.2/hash-schemas/index.html index 7f7e365f17..7c6df3eac0 100644 --- a/gems/dry-types/1.2/hash-schemas/index.html +++ b/gems/dry-types/1.2/hash-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Hash Schemas

It is possible to define a type for a hash with a known set of keys and corresponding value types. Let's say you want to describe a hash containing the name and the age of a user:

+});

Hash Schemas

It is possible to define a type for a hash with a known set of keys and corresponding value types. Let's say you want to describe a hash containing the name and the age of a user:

# using simple kernel coercions
 user_hash = Types::Hash.schema(name: Types::String, age: Types::Coercible::Integer)
 
diff --git a/gems/dry-types/1.2/hash-schemas/index.html.gz b/gems/dry-types/1.2/hash-schemas/index.html.gz
index c5d8467b7a..a1cdb8e45c 100644
Binary files a/gems/dry-types/1.2/hash-schemas/index.html.gz and b/gems/dry-types/1.2/hash-schemas/index.html.gz differ
diff --git a/gems/dry-types/1.2/index.html b/gems/dry-types/1.2/index.html
index 48caf128f9..5119ee50ee 100644
--- a/gems/dry-types/1.2/index.html
+++ b/gems/dry-types/1.2/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-types is a simple and extendable type system for Ruby; useful for value coercions, applying constraints, defining complex structs or value objects and more. It was created as a successor to Virtus.

+});

Map

Map describes a homogeneous hashmap. This means only types of keys and values are known. You can simply imagine a map input as a list of key-value pairs.

+});

Map

Map describes a homogeneous hashmap. This means only types of keys and values are known. You can simply imagine a map input as a list of key-value pairs.

int_float_hash = Types::Hash.map(Types::Integer, Types::Float)
 int_float_hash[100 => 300.0, 42 => 70.0]
 # => {100=>300.0, 42=>70.0}
diff --git a/gems/dry-types/1.2/map/index.html.gz b/gems/dry-types/1.2/map/index.html.gz
index 2994d95ad4..6a2867ca97 100644
Binary files a/gems/dry-types/1.2/map/index.html.gz and b/gems/dry-types/1.2/map/index.html.gz differ
diff --git a/gems/dry-types/1.2/optional-values/index.html b/gems/dry-types/1.2/optional-values/index.html
index 5e0ba8a8a7..6d3572e93c 100644
--- a/gems/dry-types/1.2/optional-values/index.html
+++ b/gems/dry-types/1.2/optional-values/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Type Attributes

Types themselves have optional attributes you can apply to get further functionality.

+});

Sum

You can specify sum types using | operator, it is an explicit way of defining what the valid types of a value are.

+});

Sum

You can specify sum types using | operator, it is an explicit way of defining what the valid types of a value are.

For example dry-types defines the Bool type which is a sum consisting of the True and False types, expressed as Types::True | Types::False.

diff --git a/gems/dry-types/1.2/sum/index.html.gz b/gems/dry-types/1.2/sum/index.html.gz index 787dde13b5..def3ff777d 100644 Binary files a/gems/dry-types/1.2/sum/index.html.gz and b/gems/dry-types/1.2/sum/index.html.gz differ diff --git a/gems/dry-types/1.3/array-with-member/index.html b/gems/dry-types/1.3/array-with-member/index.html index 7a7dc9f242..804dcb703d 100644 --- a/gems/dry-types/1.3/array-with-member/index.html +++ b/gems/dry-types/1.3/array-with-member/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Array With Member

The built-in array type supports defining the member's type:

+});

Array With Member

The built-in array type supports defining the member's type:

PostStatuses = Types::Array.of(Types::Coercible::String)
 
 PostStatuses[[:foo, :bar]] # ["foo", "bar"]
diff --git a/gems/dry-types/1.3/array-with-member/index.html.gz b/gems/dry-types/1.3/array-with-member/index.html.gz
index 7a3f2b238b..f32f1cf6fe 100644
Binary files a/gems/dry-types/1.3/array-with-member/index.html.gz and b/gems/dry-types/1.3/array-with-member/index.html.gz differ
diff --git a/gems/dry-types/1.3/built-in-types/index.html b/gems/dry-types/1.3/built-in-types/index.html
index c54db5d550..93d1b06b79 100644
--- a/gems/dry-types/1.3/built-in-types/index.html
+++ b/gems/dry-types/1.3/built-in-types/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in Types

Built-in types are grouped under 6 categories:

  • nominal - base type definitions with a primitive class and options
  • diff --git a/gems/dry-types/1.3/built-in-types/index.html.gz b/gems/dry-types/1.3/built-in-types/index.html.gz index bdd8d22867..b43ab5b23b 100644 Binary files a/gems/dry-types/1.3/built-in-types/index.html.gz and b/gems/dry-types/1.3/built-in-types/index.html.gz differ diff --git a/gems/dry-types/1.3/constraints/index.html b/gems/dry-types/1.3/constraints/index.html index d5a45f3321..899aeb81ea 100644 --- a/gems/dry-types/1.3/constraints/index.html +++ b/gems/dry-types/1.3/constraints/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Constraints

You can create constrained types that will use validation rules to check that the input is not violating any of the configured constraints. You can treat it as a lower level guarantee that you're not instantiating objects that are broken.

+});

Constraints

You can create constrained types that will use validation rules to check that the input is not violating any of the configured constraints. You can treat it as a lower level guarantee that you're not instantiating objects that are broken.

All types support the constraints API, but not all constraints are suitable for a particular primitive, it's up to you to set up constraints that make sense.

diff --git a/gems/dry-types/1.3/constraints/index.html.gz b/gems/dry-types/1.3/constraints/index.html.gz index 3f8585dac2..2b55b1acfa 100644 Binary files a/gems/dry-types/1.3/constraints/index.html.gz and b/gems/dry-types/1.3/constraints/index.html.gz differ diff --git a/gems/dry-types/1.3/custom-types/index.html b/gems/dry-types/1.3/custom-types/index.html index 7370ccb010..94caa98f86 100644 --- a/gems/dry-types/1.3/custom-types/index.html +++ b/gems/dry-types/1.3/custom-types/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom Types

There are a bunch of helpers for building your own types based on existing classes and values. These helpers are automatically defined if you're imported types in a module.

+});

Default Values

A type with a default value will return the configured value when the input is not defined:

+});

Default Values

A type with a default value will return the configured value when the input is not defined:

PostStatus = Types::String.default('draft')
 
 PostStatus[] # "draft"
diff --git a/gems/dry-types/1.3/default-values/index.html.gz b/gems/dry-types/1.3/default-values/index.html.gz
index 7b5d1cc6a8..40c85371c2 100644
Binary files a/gems/dry-types/1.3/default-values/index.html.gz and b/gems/dry-types/1.3/default-values/index.html.gz differ
diff --git a/gems/dry-types/1.3/enum/index.html b/gems/dry-types/1.3/enum/index.html
index a9d9185641..c1b8cfecdd 100644
--- a/gems/dry-types/1.3/enum/index.html
+++ b/gems/dry-types/1.3/enum/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Enum

In many cases you may want to define an enum. For example, in a blog application a post may have a finite list of statuses. Apart from accessing the current status value, it is useful to have all possible values accessible too. Furthermore, an enum can be a map from, e.g., strings to integers. This is useful for mapping externally-provided integer values to human-readable strings without explicit conversions, see examples.

+});

Enum

In many cases you may want to define an enum. For example, in a blog application a post may have a finite list of statuses. Apart from accessing the current status value, it is useful to have all possible values accessible too. Furthermore, an enum can be a map from, e.g., strings to integers. This is useful for mapping externally-provided integer values to human-readable strings without explicit conversions, see examples.

require 'dry-types'
 require 'dry-struct'
 
diff --git a/gems/dry-types/1.3/enum/index.html.gz b/gems/dry-types/1.3/enum/index.html.gz
index 50999a7e5f..de3effe4af 100644
Binary files a/gems/dry-types/1.3/enum/index.html.gz and b/gems/dry-types/1.3/enum/index.html.gz differ
diff --git a/gems/dry-types/1.3/extensions/index.html b/gems/dry-types/1.3/extensions/index.html
index 9cb97ca329..9464d56da0 100644
--- a/gems/dry-types/1.3/extensions/index.html
+++ b/gems/dry-types/1.3/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-types can be extended with extension. Those extensions are loaded with Dry::Types.load_extensions.

+});

Extensions

dry-types can be extended with extension. Those extensions are loaded with Dry::Types.load_extensions.

Available extensions:

diff --git a/gems/dry-types/1.3/extensions/index.html.gz b/gems/dry-types/1.3/extensions/index.html.gz index 5ab5b02c64..e0621c1b7a 100644 Binary files a/gems/dry-types/1.3/extensions/index.html.gz and b/gems/dry-types/1.3/extensions/index.html.gz differ diff --git a/gems/dry-types/1.3/extensions/maybe/index.html b/gems/dry-types/1.3/extensions/maybe/index.html index 5d29c514ff..2f682694fd 100644 --- a/gems/dry-types/1.3/extensions/maybe/index.html +++ b/gems/dry-types/1.3/extensions/maybe/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Maybe

The dry-monads gem provides approach to handling optional values by returning a Monad object. This allows you to pass your type to a Maybe(x) block that only executes if x returns Some or None.

+});

Maybe

The dry-monads gem provides approach to handling optional values by returning a Monad object. This allows you to pass your type to a Maybe(x) block that only executes if x returns Some or None.

NOTE: Requires the dry-monads gem to be loaded.

diff --git a/gems/dry-types/1.3/extensions/maybe/index.html.gz b/gems/dry-types/1.3/extensions/maybe/index.html.gz index f1627083d3..fbef802a11 100644 Binary files a/gems/dry-types/1.3/extensions/maybe/index.html.gz and b/gems/dry-types/1.3/extensions/maybe/index.html.gz differ diff --git a/gems/dry-types/1.3/extensions/monads/index.html b/gems/dry-types/1.3/extensions/monads/index.html index b3f6da6224..d5bae54006 100644 --- a/gems/dry-types/1.3/extensions/monads/index.html +++ b/gems/dry-types/1.3/extensions/monads/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Monads

The monads extension makes Dry::Types::Result objects compatible with dry-monads.

+});

Monads

The monads extension makes Dry::Types::Result objects compatible with dry-monads.

To enable the extension:

require 'dry/types'
diff --git a/gems/dry-types/1.3/extensions/monads/index.html.gz b/gems/dry-types/1.3/extensions/monads/index.html.gz
index b3ff62bcfd..73d96c17bb 100644
Binary files a/gems/dry-types/1.3/extensions/monads/index.html.gz and b/gems/dry-types/1.3/extensions/monads/index.html.gz differ
diff --git a/gems/dry-types/1.3/getting-started/index.html b/gems/dry-types/1.3/getting-started/index.html
index 65618b4fdc..04fcd8f783 100644
--- a/gems/dry-types/1.3/getting-started/index.html
+++ b/gems/dry-types/1.3/getting-started/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Getting Started

Using Dry::Types in Your Application

diff --git a/gems/dry-types/1.3/getting-started/index.html.gz b/gems/dry-types/1.3/getting-started/index.html.gz index dac95fdb54..a8e2999239 100644 Binary files a/gems/dry-types/1.3/getting-started/index.html.gz and b/gems/dry-types/1.3/getting-started/index.html.gz differ diff --git a/gems/dry-types/1.3/hash-schemas/index.html b/gems/dry-types/1.3/hash-schemas/index.html index 347eed1b27..0a2205844c 100644 --- a/gems/dry-types/1.3/hash-schemas/index.html +++ b/gems/dry-types/1.3/hash-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Hash Schemas

It is possible to define a type for a hash with a known set of keys and corresponding value types. Let's say you want to describe a hash containing the name and the age of a user:

+});

Hash Schemas

It is possible to define a type for a hash with a known set of keys and corresponding value types. Let's say you want to describe a hash containing the name and the age of a user:

# using simple kernel coercions
 user_hash = Types::Hash.schema(name: Types::String, age: Types::Coercible::Integer)
 
diff --git a/gems/dry-types/1.3/hash-schemas/index.html.gz b/gems/dry-types/1.3/hash-schemas/index.html.gz
index 782527e979..46a5691d44 100644
Binary files a/gems/dry-types/1.3/hash-schemas/index.html.gz and b/gems/dry-types/1.3/hash-schemas/index.html.gz differ
diff --git a/gems/dry-types/1.3/index.html b/gems/dry-types/1.3/index.html
index db103815ba..9bec68f4b1 100644
--- a/gems/dry-types/1.3/index.html
+++ b/gems/dry-types/1.3/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-types is a simple and extendable type system for Ruby; useful for value coercions, applying constraints, defining complex structs or value objects and more. It was created as a successor to Virtus.

+});

Map

Map describes a homogeneous hashmap. This means only types of keys and values are known. You can simply imagine a map input as a list of key-value pairs.

+});

Map

Map describes a homogeneous hashmap. This means only types of keys and values are known. You can simply imagine a map input as a list of key-value pairs.

int_float_hash = Types::Hash.map(Types::Integer, Types::Float)
 int_float_hash[100 => 300.0, 42 => 70.0]
 # => {100=>300.0, 42=>70.0}
diff --git a/gems/dry-types/1.3/map/index.html.gz b/gems/dry-types/1.3/map/index.html.gz
index c23e45e91f..1882b84b02 100644
Binary files a/gems/dry-types/1.3/map/index.html.gz and b/gems/dry-types/1.3/map/index.html.gz differ
diff --git a/gems/dry-types/1.3/optional-values/index.html b/gems/dry-types/1.3/optional-values/index.html
index 153de60e3e..ac48a9eb11 100644
--- a/gems/dry-types/1.3/optional-values/index.html
+++ b/gems/dry-types/1.3/optional-values/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Type Attributes

Types themselves have optional attributes you can apply to get further functionality.

+});

Sum

You can specify sum types using | operator, it is an explicit way of defining what the valid types of a value are.

+});

Sum

You can specify sum types using | operator, it is an explicit way of defining what the valid types of a value are.

For example dry-types defines the Bool type which is a sum consisting of the True and False types, expressed as Types::True | Types::False.

diff --git a/gems/dry-types/1.3/sum/index.html.gz b/gems/dry-types/1.3/sum/index.html.gz index 9cd752c44c..e1c1fea48c 100644 Binary files a/gems/dry-types/1.3/sum/index.html.gz and b/gems/dry-types/1.3/sum/index.html.gz differ diff --git a/gems/dry-types/1.4/array-with-member/index.html b/gems/dry-types/1.4/array-with-member/index.html index 19c54673f2..a48e83fb60 100644 --- a/gems/dry-types/1.4/array-with-member/index.html +++ b/gems/dry-types/1.4/array-with-member/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Array With Member

The built-in array type supports defining the member's type:

+});

Array With Member

The built-in array type supports defining the member's type:

PostStatuses = Types::Array.of(Types::Coercible::String)
 
 PostStatuses[[:foo, :bar]] # ["foo", "bar"]
diff --git a/gems/dry-types/1.4/array-with-member/index.html.gz b/gems/dry-types/1.4/array-with-member/index.html.gz
index 6f7aeb039a..66f261be61 100644
Binary files a/gems/dry-types/1.4/array-with-member/index.html.gz and b/gems/dry-types/1.4/array-with-member/index.html.gz differ
diff --git a/gems/dry-types/1.4/built-in-types/index.html b/gems/dry-types/1.4/built-in-types/index.html
index 2af8c8baca..d3b0653639 100644
--- a/gems/dry-types/1.4/built-in-types/index.html
+++ b/gems/dry-types/1.4/built-in-types/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in Types

Built-in types are grouped under 6 categories:

  • nominal - base type definitions with a primitive class and options
  • diff --git a/gems/dry-types/1.4/built-in-types/index.html.gz b/gems/dry-types/1.4/built-in-types/index.html.gz index 90a8367c81..da83beb646 100644 Binary files a/gems/dry-types/1.4/built-in-types/index.html.gz and b/gems/dry-types/1.4/built-in-types/index.html.gz differ diff --git a/gems/dry-types/1.4/constraints/index.html b/gems/dry-types/1.4/constraints/index.html index 9227c270e9..64c13ee864 100644 --- a/gems/dry-types/1.4/constraints/index.html +++ b/gems/dry-types/1.4/constraints/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Constraints

You can create constrained types that will use validation rules to check that the input is not violating any of the configured constraints. You can treat it as a lower level guarantee that you're not instantiating objects that are broken.

+});

Constraints

You can create constrained types that will use validation rules to check that the input is not violating any of the configured constraints. You can treat it as a lower level guarantee that you're not instantiating objects that are broken.

All types support the constraints API, but not all constraints are suitable for a particular primitive, it's up to you to set up constraints that make sense.

diff --git a/gems/dry-types/1.4/constraints/index.html.gz b/gems/dry-types/1.4/constraints/index.html.gz index 80357fec56..ccd1dc8326 100644 Binary files a/gems/dry-types/1.4/constraints/index.html.gz and b/gems/dry-types/1.4/constraints/index.html.gz differ diff --git a/gems/dry-types/1.4/custom-types/index.html b/gems/dry-types/1.4/custom-types/index.html index 3900d6280c..3d4d489da7 100644 --- a/gems/dry-types/1.4/custom-types/index.html +++ b/gems/dry-types/1.4/custom-types/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom Types

There are a bunch of helpers for building your own types based on existing classes and values. These helpers are automatically defined if you're imported types in a module.

+});

Default Values

A type with a default value will return the configured value when the input is not defined:

+});

Default Values

A type with a default value will return the configured value when the input is not defined:

PostStatus = Types::String.default('draft')
 
 PostStatus[] # "draft"
diff --git a/gems/dry-types/1.4/default-values/index.html.gz b/gems/dry-types/1.4/default-values/index.html.gz
index db48196687..55ec6a0860 100644
Binary files a/gems/dry-types/1.4/default-values/index.html.gz and b/gems/dry-types/1.4/default-values/index.html.gz differ
diff --git a/gems/dry-types/1.4/enum/index.html b/gems/dry-types/1.4/enum/index.html
index 8008d1a281..9bd2b0232b 100644
--- a/gems/dry-types/1.4/enum/index.html
+++ b/gems/dry-types/1.4/enum/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Enum

In many cases you may want to define an enum. For example, in a blog application a post may have a finite list of statuses. Apart from accessing the current status value, it is useful to have all possible values accessible too. Furthermore, an enum can be a map from, e.g., strings to integers. This is useful for mapping externally-provided integer values to human-readable strings without explicit conversions, see examples.

+});

Enum

In many cases you may want to define an enum. For example, in a blog application a post may have a finite list of statuses. Apart from accessing the current status value, it is useful to have all possible values accessible too. Furthermore, an enum can be a map from, e.g., strings to integers. This is useful for mapping externally-provided integer values to human-readable strings without explicit conversions, see examples.

require 'dry-types'
 require 'dry-struct'
 
diff --git a/gems/dry-types/1.4/enum/index.html.gz b/gems/dry-types/1.4/enum/index.html.gz
index e26776280b..5e6d5111d7 100644
Binary files a/gems/dry-types/1.4/enum/index.html.gz and b/gems/dry-types/1.4/enum/index.html.gz differ
diff --git a/gems/dry-types/1.4/extensions/index.html b/gems/dry-types/1.4/extensions/index.html
index 701bcb6bd9..f56512c590 100644
--- a/gems/dry-types/1.4/extensions/index.html
+++ b/gems/dry-types/1.4/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-types can be extended with extension. Those extensions are loaded with Dry::Types.load_extensions.

+});

Extensions

dry-types can be extended with extension. Those extensions are loaded with Dry::Types.load_extensions.

Available extensions:

diff --git a/gems/dry-types/1.4/extensions/index.html.gz b/gems/dry-types/1.4/extensions/index.html.gz index fa3393516a..20bded9339 100644 Binary files a/gems/dry-types/1.4/extensions/index.html.gz and b/gems/dry-types/1.4/extensions/index.html.gz differ diff --git a/gems/dry-types/1.4/extensions/maybe/index.html b/gems/dry-types/1.4/extensions/maybe/index.html index 7ff6d6594e..c144893e68 100644 --- a/gems/dry-types/1.4/extensions/maybe/index.html +++ b/gems/dry-types/1.4/extensions/maybe/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Maybe

The dry-monads gem provides approach to handling optional values by returning a Monad object. This allows you to pass your type to a Maybe(x) block that only executes if x returns Some or None.

+});

Maybe

The dry-monads gem provides approach to handling optional values by returning a Monad object. This allows you to pass your type to a Maybe(x) block that only executes if x returns Some or None.

NOTE: Requires the dry-monads gem to be loaded.

diff --git a/gems/dry-types/1.4/extensions/maybe/index.html.gz b/gems/dry-types/1.4/extensions/maybe/index.html.gz index 9e35f8e102..e3e04a3d70 100644 Binary files a/gems/dry-types/1.4/extensions/maybe/index.html.gz and b/gems/dry-types/1.4/extensions/maybe/index.html.gz differ diff --git a/gems/dry-types/1.4/extensions/monads/index.html b/gems/dry-types/1.4/extensions/monads/index.html index e7d9949976..453142f520 100644 --- a/gems/dry-types/1.4/extensions/monads/index.html +++ b/gems/dry-types/1.4/extensions/monads/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Monads

The monads extension makes Dry::Types::Result objects compatible with dry-monads.

+});

Monads

The monads extension makes Dry::Types::Result objects compatible with dry-monads.

To enable the extension:

require 'dry/types'
diff --git a/gems/dry-types/1.4/extensions/monads/index.html.gz b/gems/dry-types/1.4/extensions/monads/index.html.gz
index de23868a9d..52d225838d 100644
Binary files a/gems/dry-types/1.4/extensions/monads/index.html.gz and b/gems/dry-types/1.4/extensions/monads/index.html.gz differ
diff --git a/gems/dry-types/1.4/getting-started/index.html b/gems/dry-types/1.4/getting-started/index.html
index 66d88e0b65..f3d34fde0c 100644
--- a/gems/dry-types/1.4/getting-started/index.html
+++ b/gems/dry-types/1.4/getting-started/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Getting Started

Using Dry::Types in Your Application

diff --git a/gems/dry-types/1.4/getting-started/index.html.gz b/gems/dry-types/1.4/getting-started/index.html.gz index f402a0875a..2872e8d633 100644 Binary files a/gems/dry-types/1.4/getting-started/index.html.gz and b/gems/dry-types/1.4/getting-started/index.html.gz differ diff --git a/gems/dry-types/1.4/hash-schemas/index.html b/gems/dry-types/1.4/hash-schemas/index.html index e65fc954b2..8b7b5395c0 100644 --- a/gems/dry-types/1.4/hash-schemas/index.html +++ b/gems/dry-types/1.4/hash-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Hash Schemas

It is possible to define a type for a hash with a known set of keys and corresponding value types. Let's say you want to describe a hash containing the name and the age of a user:

+});

Hash Schemas

It is possible to define a type for a hash with a known set of keys and corresponding value types. Let's say you want to describe a hash containing the name and the age of a user:

# using simple kernel coercions
 user_hash = Types::Hash.schema(name: Types::String, age: Types::Coercible::Integer)
 
diff --git a/gems/dry-types/1.4/hash-schemas/index.html.gz b/gems/dry-types/1.4/hash-schemas/index.html.gz
index af4d2f2ca3..29bdbcf41f 100644
Binary files a/gems/dry-types/1.4/hash-schemas/index.html.gz and b/gems/dry-types/1.4/hash-schemas/index.html.gz differ
diff --git a/gems/dry-types/1.4/index.html b/gems/dry-types/1.4/index.html
index f0161474aa..714d30e3ce 100644
--- a/gems/dry-types/1.4/index.html
+++ b/gems/dry-types/1.4/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-types is a simple and extendable type system for Ruby; useful for value coercions, applying constraints, defining complex structs or value objects and more. It was created as a successor to Virtus.

+});

Map

Map describes a homogeneous hashmap. This means only types of keys and values are known. You can simply imagine a map input as a list of key-value pairs.

+});

Map

Map describes a homogeneous hashmap. This means only types of keys and values are known. You can simply imagine a map input as a list of key-value pairs.

int_float_hash = Types::Hash.map(Types::Integer, Types::Float)
 int_float_hash[100 => 300.0, 42 => 70.0]
 # => {100=>300.0, 42=>70.0}
diff --git a/gems/dry-types/1.4/map/index.html.gz b/gems/dry-types/1.4/map/index.html.gz
index fc3fd218ba..8a4f7ede7c 100644
Binary files a/gems/dry-types/1.4/map/index.html.gz and b/gems/dry-types/1.4/map/index.html.gz differ
diff --git a/gems/dry-types/1.4/optional-values/index.html b/gems/dry-types/1.4/optional-values/index.html
index ee9c78df57..5fa1148f56 100644
--- a/gems/dry-types/1.4/optional-values/index.html
+++ b/gems/dry-types/1.4/optional-values/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Type Attributes

Types themselves have optional attributes you can apply to get further functionality.

+});

Sum

You can specify sum types using | operator, it is an explicit way of defining what the valid types of a value are.

+});

Sum

You can specify sum types using | operator, it is an explicit way of defining what the valid types of a value are.

For example dry-types defines the Bool type which is a sum consisting of the True and False types, expressed as Types::True | Types::False.

diff --git a/gems/dry-types/1.4/sum/index.html.gz b/gems/dry-types/1.4/sum/index.html.gz index a5b68def56..c1189a438e 100644 Binary files a/gems/dry-types/1.4/sum/index.html.gz and b/gems/dry-types/1.4/sum/index.html.gz differ diff --git a/gems/dry-types/1.5/array-with-member/index.html b/gems/dry-types/1.5/array-with-member/index.html index c98aa9f85f..586ef5f71a 100644 --- a/gems/dry-types/1.5/array-with-member/index.html +++ b/gems/dry-types/1.5/array-with-member/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Array With Member

The built-in array type supports defining the member's type:

PostStatuses = Types::Array.of(Types::Coercible::String)
 
 PostStatuses[[:foo, :bar]] # ["foo", "bar"]
diff --git a/gems/dry-types/1.5/array-with-member/index.html.gz b/gems/dry-types/1.5/array-with-member/index.html.gz
index a2c9997809..e0b3d14fcb 100644
Binary files a/gems/dry-types/1.5/array-with-member/index.html.gz and b/gems/dry-types/1.5/array-with-member/index.html.gz differ
diff --git a/gems/dry-types/1.5/built-in-types/index.html b/gems/dry-types/1.5/built-in-types/index.html
index ec235c37ee..306d5ac049 100644
--- a/gems/dry-types/1.5/built-in-types/index.html
+++ b/gems/dry-types/1.5/built-in-types/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in Types

Built-in types are grouped under 6 categories:

  • nominal - base type definitions with a primitive class and options
  • diff --git a/gems/dry-types/1.5/built-in-types/index.html.gz b/gems/dry-types/1.5/built-in-types/index.html.gz index d887d051c5..e06f418145 100644 Binary files a/gems/dry-types/1.5/built-in-types/index.html.gz and b/gems/dry-types/1.5/built-in-types/index.html.gz differ diff --git a/gems/dry-types/1.5/constraints/index.html b/gems/dry-types/1.5/constraints/index.html index 2422267b37..bf6d51c19b 100644 --- a/gems/dry-types/1.5/constraints/index.html +++ b/gems/dry-types/1.5/constraints/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Constraints

You can create constrained types that will use validation rules to check that the input is not violating any of the configured constraints. You can treat it as a lower level guarantee that you're not instantiating objects that are broken.

+});

Constraints

You can create constrained types that will use validation rules to check that the input is not violating any of the configured constraints. You can treat it as a lower level guarantee that you're not instantiating objects that are broken.

All types support the constraints API, but not all constraints are suitable for a particular primitive, it's up to you to set up constraints that make sense.

diff --git a/gems/dry-types/1.5/constraints/index.html.gz b/gems/dry-types/1.5/constraints/index.html.gz index 27d2296919..6188027681 100644 Binary files a/gems/dry-types/1.5/constraints/index.html.gz and b/gems/dry-types/1.5/constraints/index.html.gz differ diff --git a/gems/dry-types/1.5/custom-type-builders/index.html b/gems/dry-types/1.5/custom-type-builders/index.html index 21b3dac10a..80d8ce2891 100644 --- a/gems/dry-types/1.5/custom-type-builders/index.html +++ b/gems/dry-types/1.5/custom-type-builders/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom Type Builders

It is idiomatic to construct new types based on existing.

source_type = Dry::Types['integer']
 constructor_type = source_type.constructor(Kernel.method(:Integer))
 consrained_type = constructor_type.constrained(gteq: 18)
diff --git a/gems/dry-types/1.5/custom-type-builders/index.html.gz b/gems/dry-types/1.5/custom-type-builders/index.html.gz
index da46b245b7..d874fbdb49 100644
Binary files a/gems/dry-types/1.5/custom-type-builders/index.html.gz and b/gems/dry-types/1.5/custom-type-builders/index.html.gz differ
diff --git a/gems/dry-types/1.5/custom-types/index.html b/gems/dry-types/1.5/custom-types/index.html
index 393937eb36..80667e6921 100644
--- a/gems/dry-types/1.5/custom-types/index.html
+++ b/gems/dry-types/1.5/custom-types/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Custom Types

There are a bunch of helpers for building your own types based on existing classes and values. These helpers are automatically defined if you're imported types in a module.

+});

Default Values

A type with a default value will return the configured value when the input is not defined:

+});

Default Values

A type with a default value will return the configured value when the input is not defined:

PostStatus = Types::String.default('draft')
 
 PostStatus[] # "draft"
diff --git a/gems/dry-types/1.5/default-values/index.html.gz b/gems/dry-types/1.5/default-values/index.html.gz
index bb661e3434..a3a6f47796 100644
Binary files a/gems/dry-types/1.5/default-values/index.html.gz and b/gems/dry-types/1.5/default-values/index.html.gz differ
diff --git a/gems/dry-types/1.5/enum/index.html b/gems/dry-types/1.5/enum/index.html
index 3d1acaccdc..f8f535029e 100644
--- a/gems/dry-types/1.5/enum/index.html
+++ b/gems/dry-types/1.5/enum/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Enum

In many cases you may want to define an enum. For example, in a blog application a post may have a finite list of statuses. Apart from accessing the current status value, it is useful to have all possible values accessible too. Furthermore, an enum can be a map from, e.g., strings to integers. This is useful for mapping externally-provided integer values to human-readable strings without explicit conversions, see examples.

+});

Enum

In many cases you may want to define an enum. For example, in a blog application a post may have a finite list of statuses. Apart from accessing the current status value, it is useful to have all possible values accessible too. Furthermore, an enum can be a map from, e.g., strings to integers. This is useful for mapping externally-provided integer values to human-readable strings without explicit conversions, see examples.

require 'dry-types'
 require 'dry-struct'
 
diff --git a/gems/dry-types/1.5/enum/index.html.gz b/gems/dry-types/1.5/enum/index.html.gz
index 1aedef3e79..b2d277c1fc 100644
Binary files a/gems/dry-types/1.5/enum/index.html.gz and b/gems/dry-types/1.5/enum/index.html.gz differ
diff --git a/gems/dry-types/1.5/extensions/index.html b/gems/dry-types/1.5/extensions/index.html
index b6e15922ad..b4a3c5990b 100644
--- a/gems/dry-types/1.5/extensions/index.html
+++ b/gems/dry-types/1.5/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-types can be extended with extension. Those extensions are loaded with Dry::Types.load_extensions.

+});

Extensions

dry-types can be extended with extension. Those extensions are loaded with Dry::Types.load_extensions.

Available extensions:

diff --git a/gems/dry-types/1.5/extensions/index.html.gz b/gems/dry-types/1.5/extensions/index.html.gz index 87f558a457..9bb750b064 100644 Binary files a/gems/dry-types/1.5/extensions/index.html.gz and b/gems/dry-types/1.5/extensions/index.html.gz differ diff --git a/gems/dry-types/1.5/extensions/maybe/index.html b/gems/dry-types/1.5/extensions/maybe/index.html index 2ecc33ea2e..c1e69ca248 100644 --- a/gems/dry-types/1.5/extensions/maybe/index.html +++ b/gems/dry-types/1.5/extensions/maybe/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Maybe

The dry-monads gem provides approach to handling optional values by returning a Monad object. This allows you to pass your type to a Maybe(x) block that only executes if x returns Some or None.

+});

Maybe

The dry-monads gem provides approach to handling optional values by returning a Monad object. This allows you to pass your type to a Maybe(x) block that only executes if x returns Some or None.

NOTE: Requires the dry-monads gem to be loaded.

diff --git a/gems/dry-types/1.5/extensions/maybe/index.html.gz b/gems/dry-types/1.5/extensions/maybe/index.html.gz index 64af55596b..bf5fc8e5c4 100644 Binary files a/gems/dry-types/1.5/extensions/maybe/index.html.gz and b/gems/dry-types/1.5/extensions/maybe/index.html.gz differ diff --git a/gems/dry-types/1.5/extensions/monads/index.html b/gems/dry-types/1.5/extensions/monads/index.html index 8fe7f7ea53..3fd017bf56 100644 --- a/gems/dry-types/1.5/extensions/monads/index.html +++ b/gems/dry-types/1.5/extensions/monads/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Monads

The monads extension makes Dry::Types::Result objects compatible with dry-monads.

+});

Monads

The monads extension makes Dry::Types::Result objects compatible with dry-monads.

To enable the extension:

require 'dry/types'
diff --git a/gems/dry-types/1.5/extensions/monads/index.html.gz b/gems/dry-types/1.5/extensions/monads/index.html.gz
index abd68314cf..5b770b8beb 100644
Binary files a/gems/dry-types/1.5/extensions/monads/index.html.gz and b/gems/dry-types/1.5/extensions/monads/index.html.gz differ
diff --git a/gems/dry-types/1.5/fallbacks/index.html b/gems/dry-types/1.5/fallbacks/index.html
index 86c7201eb3..8b255631bf 100644
--- a/gems/dry-types/1.5/fallbacks/index.html
+++ b/gems/dry-types/1.5/fallbacks/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Fallbacks

Fallback value will be returned when invalid input is provided:

type = Dry::Types['integer'].fallback(100)
 
 type.(99) # => 99
diff --git a/gems/dry-types/1.5/fallbacks/index.html.gz b/gems/dry-types/1.5/fallbacks/index.html.gz
index 056863c372..02581b35bb 100644
Binary files a/gems/dry-types/1.5/fallbacks/index.html.gz and b/gems/dry-types/1.5/fallbacks/index.html.gz differ
diff --git a/gems/dry-types/1.5/getting-started/index.html b/gems/dry-types/1.5/getting-started/index.html
index 3c7c326755..c0eec46b55 100644
--- a/gems/dry-types/1.5/getting-started/index.html
+++ b/gems/dry-types/1.5/getting-started/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Getting Started

Using Dry::Types in Your Application

diff --git a/gems/dry-types/1.5/getting-started/index.html.gz b/gems/dry-types/1.5/getting-started/index.html.gz index d98e6fe8af..fcb5c7c5c8 100644 Binary files a/gems/dry-types/1.5/getting-started/index.html.gz and b/gems/dry-types/1.5/getting-started/index.html.gz differ diff --git a/gems/dry-types/1.5/hash-schemas/index.html b/gems/dry-types/1.5/hash-schemas/index.html index fc965c7d89..8e680d827e 100644 --- a/gems/dry-types/1.5/hash-schemas/index.html +++ b/gems/dry-types/1.5/hash-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Hash Schemas

It is possible to define a type for a hash with a known set of keys and corresponding value types. Let's say you want to describe a hash containing the name and the age of a user:

+});

Hash Schemas

It is possible to define a type for a hash with a known set of keys and corresponding value types. Let's say you want to describe a hash containing the name and the age of a user:

# using simple kernel coercions
 user_hash = Types::Hash.schema(name: Types::String, age: Types::Coercible::Integer)
 
diff --git a/gems/dry-types/1.5/hash-schemas/index.html.gz b/gems/dry-types/1.5/hash-schemas/index.html.gz
index 2e2864a01f..fd932f4cda 100644
Binary files a/gems/dry-types/1.5/hash-schemas/index.html.gz and b/gems/dry-types/1.5/hash-schemas/index.html.gz differ
diff --git a/gems/dry-types/1.5/index.html b/gems/dry-types/1.5/index.html
index ed26ed95c3..189f4a23f1 100644
--- a/gems/dry-types/1.5/index.html
+++ b/gems/dry-types/1.5/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-types is a simple and extendable type system for Ruby; useful for value coercions, applying constraints, defining complex structs or value objects and more. It was created as a successor to Virtus.

+});

Map

Map describes a homogeneous hashmap. This means only types of keys and values are known. You can simply imagine a map input as a list of key-value pairs.

+});

Map

Map describes a homogeneous hashmap. This means only types of keys and values are known. You can simply imagine a map input as a list of key-value pairs.

int_float_hash = Types::Hash.map(Types::Integer, Types::Float)
 int_float_hash[100 => 300.0, 42 => 70.0]
 # => {100=>300.0, 42=>70.0}
diff --git a/gems/dry-types/1.5/map/index.html.gz b/gems/dry-types/1.5/map/index.html.gz
index 66bbe34d7d..dc107c11d8 100644
Binary files a/gems/dry-types/1.5/map/index.html.gz and b/gems/dry-types/1.5/map/index.html.gz differ
diff --git a/gems/dry-types/1.5/optional-values/index.html b/gems/dry-types/1.5/optional-values/index.html
index e365ad7c0f..f85f424a53 100644
--- a/gems/dry-types/1.5/optional-values/index.html
+++ b/gems/dry-types/1.5/optional-values/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Type Attributes

Types themselves have optional attributes you can apply to get further functionality.

+});

Sum

You can specify sum types using | operator, it is an explicit way of defining what the valid types of a value are.

+});

Sum

You can specify sum types using | operator, it is an explicit way of defining what the valid types of a value are.

For example dry-types defines the Bool type which is a sum consisting of the True and False types, expressed as Types::True | Types::False.

diff --git a/gems/dry-types/1.5/sum/index.html.gz b/gems/dry-types/1.5/sum/index.html.gz index e574b0c4f4..fc330a17e9 100644 Binary files a/gems/dry-types/1.5/sum/index.html.gz and b/gems/dry-types/1.5/sum/index.html.gz differ diff --git a/gems/dry-types/1.6/array-with-member/index.html b/gems/dry-types/1.6/array-with-member/index.html index a9bbefb78a..9114fb394a 100644 --- a/gems/dry-types/1.6/array-with-member/index.html +++ b/gems/dry-types/1.6/array-with-member/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Array With Member

The built-in array type supports defining the member's type:

PostStatuses = Types::Array.of(Types::Coercible::String)
 
 PostStatuses[[:foo, :bar]] # ["foo", "bar"]
diff --git a/gems/dry-types/1.6/array-with-member/index.html.gz b/gems/dry-types/1.6/array-with-member/index.html.gz
index 410bdd528c..70f73974a8 100644
Binary files a/gems/dry-types/1.6/array-with-member/index.html.gz and b/gems/dry-types/1.6/array-with-member/index.html.gz differ
diff --git a/gems/dry-types/1.6/built-in-types/index.html b/gems/dry-types/1.6/built-in-types/index.html
index d56e9063a2..e5ddb0ee39 100644
--- a/gems/dry-types/1.6/built-in-types/index.html
+++ b/gems/dry-types/1.6/built-in-types/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in Types

Built-in types are grouped under 6 categories:

  • nominal - base type definitions with a primitive class and options
  • diff --git a/gems/dry-types/1.6/built-in-types/index.html.gz b/gems/dry-types/1.6/built-in-types/index.html.gz index f5c62aa2a3..bfca76aa2f 100644 Binary files a/gems/dry-types/1.6/built-in-types/index.html.gz and b/gems/dry-types/1.6/built-in-types/index.html.gz differ diff --git a/gems/dry-types/1.6/constraints/index.html b/gems/dry-types/1.6/constraints/index.html index d4396d8f1b..1a637352ab 100644 --- a/gems/dry-types/1.6/constraints/index.html +++ b/gems/dry-types/1.6/constraints/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Constraints

You can create constrained types that will use validation rules to check that the input is not violating any of the configured constraints. You can treat it as a lower level guarantee that you're not instantiating objects that are broken.

+});

Constraints

You can create constrained types that will use validation rules to check that the input is not violating any of the configured constraints. You can treat it as a lower level guarantee that you're not instantiating objects that are broken.

All types support the constraints API, but not all constraints are suitable for a particular primitive, it's up to you to set up constraints that make sense.

diff --git a/gems/dry-types/1.6/constraints/index.html.gz b/gems/dry-types/1.6/constraints/index.html.gz index a4005ba92a..7de436c0fa 100644 Binary files a/gems/dry-types/1.6/constraints/index.html.gz and b/gems/dry-types/1.6/constraints/index.html.gz differ diff --git a/gems/dry-types/1.6/custom-type-builders/index.html b/gems/dry-types/1.6/custom-type-builders/index.html index e1060b0ceb..bb06c29e9e 100644 --- a/gems/dry-types/1.6/custom-type-builders/index.html +++ b/gems/dry-types/1.6/custom-type-builders/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom Type Builders

It is idiomatic to construct new types based on existing.

source_type = Dry::Types['integer']
 constructor_type = source_type.constructor(Kernel.method(:Integer))
 consrained_type = constructor_type.constrained(gteq: 18)
diff --git a/gems/dry-types/1.6/custom-type-builders/index.html.gz b/gems/dry-types/1.6/custom-type-builders/index.html.gz
index be0649574c..e1d9dd8c6d 100644
Binary files a/gems/dry-types/1.6/custom-type-builders/index.html.gz and b/gems/dry-types/1.6/custom-type-builders/index.html.gz differ
diff --git a/gems/dry-types/1.6/custom-types/index.html b/gems/dry-types/1.6/custom-types/index.html
index e17136273c..e7f833b24c 100644
--- a/gems/dry-types/1.6/custom-types/index.html
+++ b/gems/dry-types/1.6/custom-types/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Custom Types

There are a bunch of helpers for building your own types based on existing classes and values. These helpers are automatically defined if you're imported types in a module.

+});

Default Values

A type with a default value will return the configured value when the input is not defined:

+});

Default Values

A type with a default value will return the configured value when the input is not defined:

PostStatus = Types::String.default('draft')
 
 PostStatus[] # "draft"
diff --git a/gems/dry-types/1.6/default-values/index.html.gz b/gems/dry-types/1.6/default-values/index.html.gz
index bd08d9ad55..7a2602d0da 100644
Binary files a/gems/dry-types/1.6/default-values/index.html.gz and b/gems/dry-types/1.6/default-values/index.html.gz differ
diff --git a/gems/dry-types/1.6/enum/index.html b/gems/dry-types/1.6/enum/index.html
index b44011dfd6..adc0b95bfe 100644
--- a/gems/dry-types/1.6/enum/index.html
+++ b/gems/dry-types/1.6/enum/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Enum

In many cases you may want to define an enum. For example, in a blog application a post may have a finite list of statuses. Apart from accessing the current status value, it is useful to have all possible values accessible too. Furthermore, an enum can be a map from, e.g., strings to integers. This is useful for mapping externally-provided integer values to human-readable strings without explicit conversions, see examples.

+});

Enum

In many cases you may want to define an enum. For example, in a blog application a post may have a finite list of statuses. Apart from accessing the current status value, it is useful to have all possible values accessible too. Furthermore, an enum can be a map from, e.g., strings to integers. This is useful for mapping externally-provided integer values to human-readable strings without explicit conversions, see examples.

require 'dry-types'
 require 'dry-struct'
 
diff --git a/gems/dry-types/1.6/enum/index.html.gz b/gems/dry-types/1.6/enum/index.html.gz
index 9680304658..c8bfbc75e5 100644
Binary files a/gems/dry-types/1.6/enum/index.html.gz and b/gems/dry-types/1.6/enum/index.html.gz differ
diff --git a/gems/dry-types/1.6/extensions/index.html b/gems/dry-types/1.6/extensions/index.html
index 852b876fe5..77ab09f8b2 100644
--- a/gems/dry-types/1.6/extensions/index.html
+++ b/gems/dry-types/1.6/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-types can be extended with extension. Those extensions are loaded with Dry::Types.load_extensions.

+});

Extensions

dry-types can be extended with extension. Those extensions are loaded with Dry::Types.load_extensions.

Available extensions:

diff --git a/gems/dry-types/1.6/extensions/index.html.gz b/gems/dry-types/1.6/extensions/index.html.gz index e22098345d..5c57be819f 100644 Binary files a/gems/dry-types/1.6/extensions/index.html.gz and b/gems/dry-types/1.6/extensions/index.html.gz differ diff --git a/gems/dry-types/1.6/extensions/maybe/index.html b/gems/dry-types/1.6/extensions/maybe/index.html index f5d9d78b08..72de2bfa3d 100644 --- a/gems/dry-types/1.6/extensions/maybe/index.html +++ b/gems/dry-types/1.6/extensions/maybe/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Maybe

The dry-monads gem provides an approach to handling optional values by returning a Maybe object from operations that can return nil.

+});

Maybe

The dry-monads gem provides an approach to handling optional values by returning a Maybe object from operations that can return nil.

dry-types has an extension that can return Maybes from calls to types. That is, it wraps the return result in either:

diff --git a/gems/dry-types/1.6/extensions/maybe/index.html.gz b/gems/dry-types/1.6/extensions/maybe/index.html.gz index c7971c4115..3b9160b74b 100644 Binary files a/gems/dry-types/1.6/extensions/maybe/index.html.gz and b/gems/dry-types/1.6/extensions/maybe/index.html.gz differ diff --git a/gems/dry-types/1.6/extensions/monads/index.html b/gems/dry-types/1.6/extensions/monads/index.html index 201a6b7723..902272bf37 100644 --- a/gems/dry-types/1.6/extensions/monads/index.html +++ b/gems/dry-types/1.6/extensions/monads/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Monads

The :monads extension provides a #to_monad method that returns a Result compatible with dry-monads.

+});

Monads

The :monads extension provides a #to_monad method that returns a Result compatible with dry-monads.

The .try method returns a simple Result that's defined within dry-types (i.e. Dry::Types::Result). If you want to use the result with dry-monads, you can load this extension and call #to_monad on the Dry::Types::Result to get a Result that's defined in dry-monads (i.e. Dry::Monads::Result). This will let you use the dry-monads methods on the result.

diff --git a/gems/dry-types/1.6/extensions/monads/index.html.gz b/gems/dry-types/1.6/extensions/monads/index.html.gz index e4cbc7771b..d4f76260d0 100644 Binary files a/gems/dry-types/1.6/extensions/monads/index.html.gz and b/gems/dry-types/1.6/extensions/monads/index.html.gz differ diff --git a/gems/dry-types/1.6/fallbacks/index.html b/gems/dry-types/1.6/fallbacks/index.html index 0ebda23629..c01f3a6056 100644 --- a/gems/dry-types/1.6/fallbacks/index.html +++ b/gems/dry-types/1.6/fallbacks/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Fallbacks

Fallback value will be returned when invalid input is provided:

type = Dry::Types['integer'].fallback(100)
 
 type.(99) # => 99
diff --git a/gems/dry-types/1.6/fallbacks/index.html.gz b/gems/dry-types/1.6/fallbacks/index.html.gz
index 2aed5ffa02..12e591ebc6 100644
Binary files a/gems/dry-types/1.6/fallbacks/index.html.gz and b/gems/dry-types/1.6/fallbacks/index.html.gz differ
diff --git a/gems/dry-types/1.6/getting-started/index.html b/gems/dry-types/1.6/getting-started/index.html
index 51fd5bc4c6..9b7f912b96 100644
--- a/gems/dry-types/1.6/getting-started/index.html
+++ b/gems/dry-types/1.6/getting-started/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Getting Started

Using Dry::Types in Your Application

diff --git a/gems/dry-types/1.6/getting-started/index.html.gz b/gems/dry-types/1.6/getting-started/index.html.gz index 42cbea9cae..bad883e30f 100644 Binary files a/gems/dry-types/1.6/getting-started/index.html.gz and b/gems/dry-types/1.6/getting-started/index.html.gz differ diff --git a/gems/dry-types/1.6/hash-schemas/index.html b/gems/dry-types/1.6/hash-schemas/index.html index b0f22d6573..e6be5171c7 100644 --- a/gems/dry-types/1.6/hash-schemas/index.html +++ b/gems/dry-types/1.6/hash-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Hash Schemas

It is possible to define a type for a hash with a known set of keys and corresponding value types. Let's say you want to describe a hash containing the name and the age of a user:

+});

Hash Schemas

It is possible to define a type for a hash with a known set of keys and corresponding value types. Let's say you want to describe a hash containing the name and the age of a user:

# using simple kernel coercions
 user_hash = Types::Hash.schema(name: Types::String, age: Types::Coercible::Integer)
 
diff --git a/gems/dry-types/1.6/hash-schemas/index.html.gz b/gems/dry-types/1.6/hash-schemas/index.html.gz
index fd72434c82..b7e7136d14 100644
Binary files a/gems/dry-types/1.6/hash-schemas/index.html.gz and b/gems/dry-types/1.6/hash-schemas/index.html.gz differ
diff --git a/gems/dry-types/1.6/index.html b/gems/dry-types/1.6/index.html
index 640a725804..56e67b8d59 100644
--- a/gems/dry-types/1.6/index.html
+++ b/gems/dry-types/1.6/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-types is a simple and extendable type system for Ruby; useful for value coercions, applying constraints, defining complex structs or value objects and more. It was created as a successor to Virtus.

+});

Map

Map describes a homogeneous hashmap. This means only types of keys and values are known. You can simply imagine a map input as a list of key-value pairs.

+});

Map

Map describes a homogeneous hashmap. This means only types of keys and values are known. You can simply imagine a map input as a list of key-value pairs.

int_float_hash = Types::Hash.map(Types::Integer, Types::Float)
 int_float_hash[100 => 300.0, 42 => 70.0]
 # => {100=>300.0, 42=>70.0}
diff --git a/gems/dry-types/1.6/map/index.html.gz b/gems/dry-types/1.6/map/index.html.gz
index fdba49a524..4b9ffd2e0a 100644
Binary files a/gems/dry-types/1.6/map/index.html.gz and b/gems/dry-types/1.6/map/index.html.gz differ
diff --git a/gems/dry-types/1.6/optional-values/index.html b/gems/dry-types/1.6/optional-values/index.html
index 2d18abbc0a..d353f1573e 100644
--- a/gems/dry-types/1.6/optional-values/index.html
+++ b/gems/dry-types/1.6/optional-values/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Type Attributes

Types themselves have optional attributes you can apply to get further functionality.

+});

Sum

You can specify sum types using | operator, it is an explicit way of defining what the valid types of a value are.

+});

Sum

You can specify sum types using | operator, it is an explicit way of defining what the valid types of a value are.

For example dry-types defines the Bool type which is a sum consisting of the True and False types, expressed as Types::True | Types::False.

diff --git a/gems/dry-types/1.6/sum/index.html.gz b/gems/dry-types/1.6/sum/index.html.gz index e354136cec..0c2f32c87c 100644 Binary files a/gems/dry-types/1.6/sum/index.html.gz and b/gems/dry-types/1.6/sum/index.html.gz differ diff --git a/gems/dry-types/1.7/array-with-member/index.html b/gems/dry-types/1.7/array-with-member/index.html index 3479b36b9c..ab24e9005e 100644 --- a/gems/dry-types/1.7/array-with-member/index.html +++ b/gems/dry-types/1.7/array-with-member/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Array With Member

The built-in array type supports defining the member's type:

PostStatuses = Types::Array.of(Types::Coercible::String)
 
 PostStatuses[[:foo, :bar]] # ["foo", "bar"]
diff --git a/gems/dry-types/1.7/array-with-member/index.html.gz b/gems/dry-types/1.7/array-with-member/index.html.gz
index 2ea08ea2dc..491660a52d 100644
Binary files a/gems/dry-types/1.7/array-with-member/index.html.gz and b/gems/dry-types/1.7/array-with-member/index.html.gz differ
diff --git a/gems/dry-types/1.7/built-in-types/index.html b/gems/dry-types/1.7/built-in-types/index.html
index ec05840337..9302711adb 100644
--- a/gems/dry-types/1.7/built-in-types/index.html
+++ b/gems/dry-types/1.7/built-in-types/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in Types

Built-in types are grouped under 6 categories:

  • nominal - base type definitions with a primitive class and options
  • diff --git a/gems/dry-types/1.7/built-in-types/index.html.gz b/gems/dry-types/1.7/built-in-types/index.html.gz index b7f6b770af..3fe95af3ea 100644 Binary files a/gems/dry-types/1.7/built-in-types/index.html.gz and b/gems/dry-types/1.7/built-in-types/index.html.gz differ diff --git a/gems/dry-types/1.7/constraints/index.html b/gems/dry-types/1.7/constraints/index.html index 72b0ba921c..c09e6dd465 100644 --- a/gems/dry-types/1.7/constraints/index.html +++ b/gems/dry-types/1.7/constraints/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Constraints

You can create constrained types that will use validation rules to check that the input is not violating any of the configured constraints. You can treat it as a lower level guarantee that you're not instantiating objects that are broken.

+});

Constraints

You can create constrained types that will use validation rules to check that the input is not violating any of the configured constraints. You can treat it as a lower level guarantee that you're not instantiating objects that are broken.

All types support the constraints API, but not all constraints are suitable for a particular primitive, it's up to you to set up constraints that make sense.

diff --git a/gems/dry-types/1.7/constraints/index.html.gz b/gems/dry-types/1.7/constraints/index.html.gz index 4fcbbfa118..9615ba5e01 100644 Binary files a/gems/dry-types/1.7/constraints/index.html.gz and b/gems/dry-types/1.7/constraints/index.html.gz differ diff --git a/gems/dry-types/1.7/custom-type-builders/index.html b/gems/dry-types/1.7/custom-type-builders/index.html index 070bc903d8..e017add210 100644 --- a/gems/dry-types/1.7/custom-type-builders/index.html +++ b/gems/dry-types/1.7/custom-type-builders/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom Type Builders

It is idiomatic to construct new types based on existing.

source_type = Dry::Types['integer']
 constructor_type = source_type.constructor(Kernel.method(:Integer))
 consrained_type = constructor_type.constrained(gteq: 18)
diff --git a/gems/dry-types/1.7/custom-type-builders/index.html.gz b/gems/dry-types/1.7/custom-type-builders/index.html.gz
index c7e6617cd5..85a44f4c1d 100644
Binary files a/gems/dry-types/1.7/custom-type-builders/index.html.gz and b/gems/dry-types/1.7/custom-type-builders/index.html.gz differ
diff --git a/gems/dry-types/1.7/custom-types/index.html b/gems/dry-types/1.7/custom-types/index.html
index 9a5200df7b..ac36a62be8 100644
--- a/gems/dry-types/1.7/custom-types/index.html
+++ b/gems/dry-types/1.7/custom-types/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Custom Types

There are a bunch of helpers for building your own types based on existing classes and values. These helpers are automatically defined if you're imported types in a module.

+});

Default Values

A type with a default value will return the configured value when the input is not defined:

+});

Default Values

A type with a default value will return the configured value when the input is not defined:

PostStatus = Types::String.default('draft')
 
 PostStatus[] # "draft"
diff --git a/gems/dry-types/1.7/default-values/index.html.gz b/gems/dry-types/1.7/default-values/index.html.gz
index a8ffdb7e21..563b3415f9 100644
Binary files a/gems/dry-types/1.7/default-values/index.html.gz and b/gems/dry-types/1.7/default-values/index.html.gz differ
diff --git a/gems/dry-types/1.7/enum/index.html b/gems/dry-types/1.7/enum/index.html
index c90ad72b17..0800589fb4 100644
--- a/gems/dry-types/1.7/enum/index.html
+++ b/gems/dry-types/1.7/enum/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Enum

In many cases you may want to define an enum. For example, in a blog application a post may have a finite list of statuses. Apart from accessing the current status value, it is useful to have all possible values accessible too. Furthermore, an enum can be a map from, e.g., strings to integers. This is useful for mapping externally-provided integer values to human-readable strings without explicit conversions, see examples.

+});

Enum

In many cases you may want to define an enum. For example, in a blog application a post may have a finite list of statuses. Apart from accessing the current status value, it is useful to have all possible values accessible too. Furthermore, an enum can be a map from, e.g., strings to integers. This is useful for mapping externally-provided integer values to human-readable strings without explicit conversions, see examples.

require 'dry-types'
 require 'dry-struct'
 
diff --git a/gems/dry-types/1.7/enum/index.html.gz b/gems/dry-types/1.7/enum/index.html.gz
index 93857a8e45..ae55d06586 100644
Binary files a/gems/dry-types/1.7/enum/index.html.gz and b/gems/dry-types/1.7/enum/index.html.gz differ
diff --git a/gems/dry-types/1.7/extensions/index.html b/gems/dry-types/1.7/extensions/index.html
index df5b6fb890..f254d1bfc4 100644
--- a/gems/dry-types/1.7/extensions/index.html
+++ b/gems/dry-types/1.7/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-types can be extended with extension. Those extensions are loaded with Dry::Types.load_extensions.

+});

Extensions

dry-types can be extended with extension. Those extensions are loaded with Dry::Types.load_extensions.

Available extensions:

diff --git a/gems/dry-types/1.7/extensions/index.html.gz b/gems/dry-types/1.7/extensions/index.html.gz index e49856d077..615884720f 100644 Binary files a/gems/dry-types/1.7/extensions/index.html.gz and b/gems/dry-types/1.7/extensions/index.html.gz differ diff --git a/gems/dry-types/1.7/extensions/maybe/index.html b/gems/dry-types/1.7/extensions/maybe/index.html index 056d7f11d0..39a4ebfdaf 100644 --- a/gems/dry-types/1.7/extensions/maybe/index.html +++ b/gems/dry-types/1.7/extensions/maybe/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Maybe

The dry-monads gem provides an approach to handling optional values by returning a Maybe object from operations that can return nil.

+});

Maybe

The dry-monads gem provides an approach to handling optional values by returning a Maybe object from operations that can return nil.

dry-types has an extension that can return Maybes from calls to types. That is, it wraps the return result in either:

diff --git a/gems/dry-types/1.7/extensions/maybe/index.html.gz b/gems/dry-types/1.7/extensions/maybe/index.html.gz index e4cd8239fe..8caa63f727 100644 Binary files a/gems/dry-types/1.7/extensions/maybe/index.html.gz and b/gems/dry-types/1.7/extensions/maybe/index.html.gz differ diff --git a/gems/dry-types/1.7/extensions/monads/index.html b/gems/dry-types/1.7/extensions/monads/index.html index 8fda66b601..3d4a1f0ab8 100644 --- a/gems/dry-types/1.7/extensions/monads/index.html +++ b/gems/dry-types/1.7/extensions/monads/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Monads

The :monads extension provides a #to_monad method that returns a Result compatible with dry-monads.

+});

Monads

The :monads extension provides a #to_monad method that returns a Result compatible with dry-monads.

The .try method returns a simple Result that's defined within dry-types (i.e. Dry::Types::Result). If you want to use the result with dry-monads, you can load this extension and call #to_monad on the Dry::Types::Result to get a Result that's defined in dry-monads (i.e. Dry::Monads::Result). This will let you use the dry-monads methods on the result.

diff --git a/gems/dry-types/1.7/extensions/monads/index.html.gz b/gems/dry-types/1.7/extensions/monads/index.html.gz index 6eb5756077..1dba52c9cd 100644 Binary files a/gems/dry-types/1.7/extensions/monads/index.html.gz and b/gems/dry-types/1.7/extensions/monads/index.html.gz differ diff --git a/gems/dry-types/1.7/fallbacks/index.html b/gems/dry-types/1.7/fallbacks/index.html index c367532c58..e9849d56e0 100644 --- a/gems/dry-types/1.7/fallbacks/index.html +++ b/gems/dry-types/1.7/fallbacks/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Fallbacks

Fallback value will be returned when invalid input is provided:

type = Dry::Types['integer'].fallback(100)
 
 type.(99) # => 99
diff --git a/gems/dry-types/1.7/fallbacks/index.html.gz b/gems/dry-types/1.7/fallbacks/index.html.gz
index b1b6ca5fda..eb176af5e4 100644
Binary files a/gems/dry-types/1.7/fallbacks/index.html.gz and b/gems/dry-types/1.7/fallbacks/index.html.gz differ
diff --git a/gems/dry-types/1.7/getting-started/index.html b/gems/dry-types/1.7/getting-started/index.html
index 6d66ed4745..908773fb47 100644
--- a/gems/dry-types/1.7/getting-started/index.html
+++ b/gems/dry-types/1.7/getting-started/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Getting Started

Using Dry::Types in Your Application

diff --git a/gems/dry-types/1.7/getting-started/index.html.gz b/gems/dry-types/1.7/getting-started/index.html.gz index 41ec9c927d..9556a98b67 100644 Binary files a/gems/dry-types/1.7/getting-started/index.html.gz and b/gems/dry-types/1.7/getting-started/index.html.gz differ diff --git a/gems/dry-types/1.7/hash-schemas/index.html b/gems/dry-types/1.7/hash-schemas/index.html index 722be1a25a..999e2413d9 100644 --- a/gems/dry-types/1.7/hash-schemas/index.html +++ b/gems/dry-types/1.7/hash-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Hash Schemas

It is possible to define a type for a hash with a known set of keys and corresponding value types. Let's say you want to describe a hash containing the name and the age of a user:

+});

Hash Schemas

It is possible to define a type for a hash with a known set of keys and corresponding value types. Let's say you want to describe a hash containing the name and the age of a user:

# using simple kernel coercions
 user_hash = Types::Hash.schema(name: Types::String, age: Types::Coercible::Integer)
 
diff --git a/gems/dry-types/1.7/hash-schemas/index.html.gz b/gems/dry-types/1.7/hash-schemas/index.html.gz
index 66a0f4e028..92cc012fd0 100644
Binary files a/gems/dry-types/1.7/hash-schemas/index.html.gz and b/gems/dry-types/1.7/hash-schemas/index.html.gz differ
diff --git a/gems/dry-types/1.7/index.html b/gems/dry-types/1.7/index.html
index d18336357f..37219c8b86 100644
--- a/gems/dry-types/1.7/index.html
+++ b/gems/dry-types/1.7/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-types is a simple and extendable type system for Ruby; useful for value coercions, applying constraints, defining complex structs or value objects and more. It was created as a successor to Virtus.

+});

Map

Map describes a homogeneous hashmap. This means only types of keys and values are known. You can simply imagine a map input as a list of key-value pairs.

+});

Map

Map describes a homogeneous hashmap. This means only types of keys and values are known. You can simply imagine a map input as a list of key-value pairs.

int_float_hash = Types::Hash.map(Types::Integer, Types::Float)
 int_float_hash[100 => 300.0, 42 => 70.0]
 # => {100=>300.0, 42=>70.0}
diff --git a/gems/dry-types/1.7/map/index.html.gz b/gems/dry-types/1.7/map/index.html.gz
index e5ec36a28c..3deeb7af80 100644
Binary files a/gems/dry-types/1.7/map/index.html.gz and b/gems/dry-types/1.7/map/index.html.gz differ
diff --git a/gems/dry-types/1.7/optional-values/index.html b/gems/dry-types/1.7/optional-values/index.html
index 246fc075a1..0faf56f27e 100644
--- a/gems/dry-types/1.7/optional-values/index.html
+++ b/gems/dry-types/1.7/optional-values/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Type Attributes

Types themselves have optional attributes you can apply to get further functionality.

+});

Sum

You can specify sum types using | operator, it is an explicit way of defining what the valid types of a value are.

+});

Sum

You can specify sum types using | operator, it is an explicit way of defining what the valid types of a value are.

For example dry-types defines the Bool type which is a sum consisting of the True and False types, expressed as Types::True | Types::False.

diff --git a/gems/dry-types/1.7/sum/index.html.gz b/gems/dry-types/1.7/sum/index.html.gz index 5c1eff281b..bcc0e12d79 100644 Binary files a/gems/dry-types/1.7/sum/index.html.gz and b/gems/dry-types/1.7/sum/index.html.gz differ diff --git a/gems/dry-types/index.html.gz b/gems/dry-types/index.html.gz index 6ffbe52c2a..c54fe2b9c9 100644 Binary files a/gems/dry-types/index.html.gz and b/gems/dry-types/index.html.gz differ diff --git a/gems/dry-types/main/array-with-member/index.html b/gems/dry-types/main/array-with-member/index.html index 07be2203e1..2327ae31e2 100644 --- a/gems/dry-types/main/array-with-member/index.html +++ b/gems/dry-types/main/array-with-member/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Array With Member

The built-in array type supports defining the member's type:

PostStatuses = Types::Array.of(Types::Coercible::String)
 
 PostStatuses[[:foo, :bar]] # ["foo", "bar"]
diff --git a/gems/dry-types/main/array-with-member/index.html.gz b/gems/dry-types/main/array-with-member/index.html.gz
index 392a009f82..2a258e323b 100644
Binary files a/gems/dry-types/main/array-with-member/index.html.gz and b/gems/dry-types/main/array-with-member/index.html.gz differ
diff --git a/gems/dry-types/main/built-in-types/index.html b/gems/dry-types/main/built-in-types/index.html
index 5b0f9e63ba..37b2e38c36 100644
--- a/gems/dry-types/main/built-in-types/index.html
+++ b/gems/dry-types/main/built-in-types/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Built-in Types

Built-in types are grouped under 6 categories:

  • nominal - base type definitions with a primitive class and options
  • diff --git a/gems/dry-types/main/built-in-types/index.html.gz b/gems/dry-types/main/built-in-types/index.html.gz index cabc3ae418..b13b153f6f 100644 Binary files a/gems/dry-types/main/built-in-types/index.html.gz and b/gems/dry-types/main/built-in-types/index.html.gz differ diff --git a/gems/dry-types/main/constraints/index.html b/gems/dry-types/main/constraints/index.html index 8f72c99232..8fcf918df1 100644 --- a/gems/dry-types/main/constraints/index.html +++ b/gems/dry-types/main/constraints/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Constraints

You can create constrained types that will use validation rules to check that the input is not violating any of the configured constraints. You can treat it as a lower level guarantee that you're not instantiating objects that are broken.

+});

Constraints

You can create constrained types that will use validation rules to check that the input is not violating any of the configured constraints. You can treat it as a lower level guarantee that you're not instantiating objects that are broken.

All types support the constraints API, but not all constraints are suitable for a particular primitive, it's up to you to set up constraints that make sense.

diff --git a/gems/dry-types/main/constraints/index.html.gz b/gems/dry-types/main/constraints/index.html.gz index c8a24b1b75..edbdd32af4 100644 Binary files a/gems/dry-types/main/constraints/index.html.gz and b/gems/dry-types/main/constraints/index.html.gz differ diff --git a/gems/dry-types/main/custom-type-builders/index.html b/gems/dry-types/main/custom-type-builders/index.html index e77c668bd8..25c9533f42 100644 --- a/gems/dry-types/main/custom-type-builders/index.html +++ b/gems/dry-types/main/custom-type-builders/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom Type Builders

It is idiomatic to construct new types based on existing.

source_type = Dry::Types['integer']
 constructor_type = source_type.constructor(Kernel.method(:Integer))
 consrained_type = constructor_type.constrained(gteq: 18)
diff --git a/gems/dry-types/main/custom-type-builders/index.html.gz b/gems/dry-types/main/custom-type-builders/index.html.gz
index 5bfeb3504d..e90dc9a0af 100644
Binary files a/gems/dry-types/main/custom-type-builders/index.html.gz and b/gems/dry-types/main/custom-type-builders/index.html.gz differ
diff --git a/gems/dry-types/main/custom-types/index.html b/gems/dry-types/main/custom-types/index.html
index 87892e79f0..4a90b91ae4 100644
--- a/gems/dry-types/main/custom-types/index.html
+++ b/gems/dry-types/main/custom-types/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Custom Types

There are a bunch of helpers for building your own types based on existing classes and values. These helpers are automatically defined if you're imported types in a module.

+});

Default Values

A type with a default value will return the configured value when the input is not defined:

+});

Default Values

A type with a default value will return the configured value when the input is not defined:

PostStatus = Types::String.default('draft')
 
 PostStatus[] # "draft"
diff --git a/gems/dry-types/main/default-values/index.html.gz b/gems/dry-types/main/default-values/index.html.gz
index bcce5cb57a..c5dc87a8f1 100644
Binary files a/gems/dry-types/main/default-values/index.html.gz and b/gems/dry-types/main/default-values/index.html.gz differ
diff --git a/gems/dry-types/main/enum/index.html b/gems/dry-types/main/enum/index.html
index e8f6edfe15..a79257d646 100644
--- a/gems/dry-types/main/enum/index.html
+++ b/gems/dry-types/main/enum/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Enum

In many cases you may want to define an enum. For example, in a blog application a post may have a finite list of statuses. Apart from accessing the current status value, it is useful to have all possible values accessible too. Furthermore, an enum can be a map from, e.g., strings to integers. This is useful for mapping externally-provided integer values to human-readable strings without explicit conversions, see examples.

+});

Enum

In many cases you may want to define an enum. For example, in a blog application a post may have a finite list of statuses. Apart from accessing the current status value, it is useful to have all possible values accessible too. Furthermore, an enum can be a map from, e.g., strings to integers. This is useful for mapping externally-provided integer values to human-readable strings without explicit conversions, see examples.

require 'dry-types'
 require 'dry-struct'
 
diff --git a/gems/dry-types/main/enum/index.html.gz b/gems/dry-types/main/enum/index.html.gz
index f3e1cccbba..97d7a87cc0 100644
Binary files a/gems/dry-types/main/enum/index.html.gz and b/gems/dry-types/main/enum/index.html.gz differ
diff --git a/gems/dry-types/main/extensions/index.html b/gems/dry-types/main/extensions/index.html
index 6fdf571a74..aa3c47fbb6 100644
--- a/gems/dry-types/main/extensions/index.html
+++ b/gems/dry-types/main/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-types can be extended with extension. Those extensions are loaded with Dry::Types.load_extensions.

+});

Extensions

dry-types can be extended with extension. Those extensions are loaded with Dry::Types.load_extensions.

Available extensions:

diff --git a/gems/dry-types/main/extensions/index.html.gz b/gems/dry-types/main/extensions/index.html.gz index d38c776f52..6387d8f618 100644 Binary files a/gems/dry-types/main/extensions/index.html.gz and b/gems/dry-types/main/extensions/index.html.gz differ diff --git a/gems/dry-types/main/extensions/maybe/index.html b/gems/dry-types/main/extensions/maybe/index.html index 7dfbba44a7..8df73db916 100644 --- a/gems/dry-types/main/extensions/maybe/index.html +++ b/gems/dry-types/main/extensions/maybe/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Maybe

The dry-monads gem provides an approach to handling optional values by returning a Maybe object from operations that can return nil.

+});

Maybe

The dry-monads gem provides an approach to handling optional values by returning a Maybe object from operations that can return nil.

dry-types has an extension that can return Maybes from calls to types. That is, it wraps the return result in either:

diff --git a/gems/dry-types/main/extensions/maybe/index.html.gz b/gems/dry-types/main/extensions/maybe/index.html.gz index dc8a7e92c0..485f8be19d 100644 Binary files a/gems/dry-types/main/extensions/maybe/index.html.gz and b/gems/dry-types/main/extensions/maybe/index.html.gz differ diff --git a/gems/dry-types/main/extensions/monads/index.html b/gems/dry-types/main/extensions/monads/index.html index f1a412a2e4..1002c63768 100644 --- a/gems/dry-types/main/extensions/monads/index.html +++ b/gems/dry-types/main/extensions/monads/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Monads

The :monads extension provides a #to_monad method that returns a Result compatible with dry-monads.

+});

Monads

The :monads extension provides a #to_monad method that returns a Result compatible with dry-monads.

The .try method returns a simple Result that's defined within dry-types (i.e. Dry::Types::Result). If you want to use the result with dry-monads, you can load this extension and call #to_monad on the Dry::Types::Result to get a Result that's defined in dry-monads (i.e. Dry::Monads::Result). This will let you use the dry-monads methods on the result.

diff --git a/gems/dry-types/main/extensions/monads/index.html.gz b/gems/dry-types/main/extensions/monads/index.html.gz index b597bbb8ca..1842ebdd99 100644 Binary files a/gems/dry-types/main/extensions/monads/index.html.gz and b/gems/dry-types/main/extensions/monads/index.html.gz differ diff --git a/gems/dry-types/main/fallbacks/index.html b/gems/dry-types/main/fallbacks/index.html index 384d9af6e0..8c3a99a2ea 100644 --- a/gems/dry-types/main/fallbacks/index.html +++ b/gems/dry-types/main/fallbacks/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Fallbacks

Fallback value will be returned when invalid input is provided:

type = Dry::Types['integer'].fallback(100)
 
 type.(99) # => 99
diff --git a/gems/dry-types/main/fallbacks/index.html.gz b/gems/dry-types/main/fallbacks/index.html.gz
index f40246c63b..9a6d544d5b 100644
Binary files a/gems/dry-types/main/fallbacks/index.html.gz and b/gems/dry-types/main/fallbacks/index.html.gz differ
diff --git a/gems/dry-types/main/getting-started/index.html b/gems/dry-types/main/getting-started/index.html
index 287acc4a17..0993455e91 100644
--- a/gems/dry-types/main/getting-started/index.html
+++ b/gems/dry-types/main/getting-started/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Getting Started

Using Dry::Types in Your Application

diff --git a/gems/dry-types/main/getting-started/index.html.gz b/gems/dry-types/main/getting-started/index.html.gz index 3bd612eec9..d5d22790fd 100644 Binary files a/gems/dry-types/main/getting-started/index.html.gz and b/gems/dry-types/main/getting-started/index.html.gz differ diff --git a/gems/dry-types/main/hash-schemas/index.html b/gems/dry-types/main/hash-schemas/index.html index e1bd7d899e..42c57af4e2 100644 --- a/gems/dry-types/main/hash-schemas/index.html +++ b/gems/dry-types/main/hash-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Hash Schemas

It is possible to define a type for a hash with a known set of keys and corresponding value types. Let's say you want to describe a hash containing the name and the age of a user:

+});

Hash Schemas

It is possible to define a type for a hash with a known set of keys and corresponding value types. Let's say you want to describe a hash containing the name and the age of a user:

# using simple kernel coercions
 user_hash = Types::Hash.schema(name: Types::String, age: Types::Coercible::Integer)
 
diff --git a/gems/dry-types/main/hash-schemas/index.html.gz b/gems/dry-types/main/hash-schemas/index.html.gz
index b226b3fe24..31c805472e 100644
Binary files a/gems/dry-types/main/hash-schemas/index.html.gz and b/gems/dry-types/main/hash-schemas/index.html.gz differ
diff --git a/gems/dry-types/main/index.html b/gems/dry-types/main/index.html
index 21181315f4..7e55170636 100644
--- a/gems/dry-types/main/index.html
+++ b/gems/dry-types/main/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-types is a simple and extendable type system for Ruby; useful for value coercions, applying constraints, defining complex structs or value objects and more. It was created as a successor to Virtus.

+});

Map

Map describes a homogeneous hashmap. This means only types of keys and values are known. You can simply imagine a map input as a list of key-value pairs.

+});

Map

Map describes a homogeneous hashmap. This means only types of keys and values are known. You can simply imagine a map input as a list of key-value pairs.

int_float_hash = Types::Hash.map(Types::Integer, Types::Float)
 int_float_hash[100 => 300.0, 42 => 70.0]
 # => {100=>300.0, 42=>70.0}
diff --git a/gems/dry-types/main/map/index.html.gz b/gems/dry-types/main/map/index.html.gz
index 79f8071528..4708ab47dc 100644
Binary files a/gems/dry-types/main/map/index.html.gz and b/gems/dry-types/main/map/index.html.gz differ
diff --git a/gems/dry-types/main/optional-values/index.html b/gems/dry-types/main/optional-values/index.html
index b50a8fd098..b0eafad085 100644
--- a/gems/dry-types/main/optional-values/index.html
+++ b/gems/dry-types/main/optional-values/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Type Attributes

Types themselves have optional attributes you can apply to get further functionality.

+});

Sum

You can specify sum types using | operator, it is an explicit way of defining what the valid types of a value are.

+});

Sum

You can specify sum types using | operator, it is an explicit way of defining what the valid types of a value are.

For example dry-types defines the Bool type which is a sum consisting of the True and False types, expressed as Types::True | Types::False.

diff --git a/gems/dry-types/main/sum/index.html.gz b/gems/dry-types/main/sum/index.html.gz index ee47749498..fff7895f0f 100644 Binary files a/gems/dry-types/main/sum/index.html.gz and b/gems/dry-types/main/sum/index.html.gz differ diff --git a/gems/dry-validation/0.13/array-as-input/index.html b/gems/dry-validation/0.13/array-as-input/index.html index 0a758d9478..8379852819 100644 --- a/gems/dry-validation/0.13/array-as-input/index.html +++ b/gems/dry-validation/0.13/array-as-input/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Array As Input

A schema can accept either a hash or an array as the input. If you want to define a schema for an array, simply use each:

schema = Dry::Validation.Schema do
   each do
     schema do
diff --git a/gems/dry-validation/0.13/array-as-input/index.html.gz b/gems/dry-validation/0.13/array-as-input/index.html.gz
index 400539bc40..de6c4ac216 100644
Binary files a/gems/dry-validation/0.13/array-as-input/index.html.gz and b/gems/dry-validation/0.13/array-as-input/index.html.gz differ
diff --git a/gems/dry-validation/0.13/basics/built-in-predicates/index.html b/gems/dry-validation/0.13/basics/built-in-predicates/index.html
index 2d0c708646..b50a5112af 100644
--- a/gems/dry-validation/0.13/basics/built-in-predicates/index.html
+++ b/gems/dry-validation/0.13/basics/built-in-predicates/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Basics

Here's a basic example where we validate the following things:

  • The input must have a key called :email diff --git a/gems/dry-validation/0.13/basics/index.html.gz b/gems/dry-validation/0.13/basics/index.html.gz index 51bec6d9ee..7a2fe65daa 100644 Binary files a/gems/dry-validation/0.13/basics/index.html.gz and b/gems/dry-validation/0.13/basics/index.html.gz differ diff --git a/gems/dry-validation/0.13/basics/macros/index.html b/gems/dry-validation/0.13/basics/macros/index.html index ad597d4ed1..511ea96ae0 100644 --- a/gems/dry-validation/0.13/basics/macros/index.html +++ b/gems/dry-validation/0.13/basics/macros/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Macros

Rule composition using blocks is very flexible and powerful; however, in many common cases repeatedly defining the same rules leads to boilerplate code. That's why dry-validation's DSL provides convenient macros to reduce that boilerplate. Every macro can be expanded to its block-based equivalent.

+});

Predicate Logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-validation schemas have rules that are always conditional, they are executed only if defined conditions are met.

+});

Predicate Logic

Schema DSL allows you to define validation rules using predicate logic. All common logic operators are supported and you can use them to compose rules. This simple technique is very powerful as it allows you to compose validations in such a way that invalid state will not crash one of your rules. Validation is a process that always depends on specific conditions, in that sense, dry-validation schemas have rules that are always conditional, they are executed only if defined conditions are met.

This document explains how rule composition works in terms of predicate logic.

Working With Schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

+});

Working With Schemas

A schema is an object which contains a list of rules that will be applied to its input when you call a schema. It returns a result object which provides an API to retrieve error messages and access to the validation output.

Schema definition best practices:

diff --git a/gems/dry-validation/0.13/basics/working-with-schemas/index.html.gz b/gems/dry-validation/0.13/basics/working-with-schemas/index.html.gz index 4b9dcd8d65..e3ae9865f3 100644 Binary files a/gems/dry-validation/0.13/basics/working-with-schemas/index.html.gz and b/gems/dry-validation/0.13/basics/working-with-schemas/index.html.gz differ diff --git a/gems/dry-validation/0.13/comparison-with-activemodel/index.html b/gems/dry-validation/0.13/comparison-with-activemodel/index.html index 3651d7c313..dfa924b16f 100644 --- a/gems/dry-validation/0.13/comparison-with-activemodel/index.html +++ b/gems/dry-validation/0.13/comparison-with-activemodel/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Comparison With ActiveModel

As explained in the introduction, dry-validation focuses on explicitness, clarity and precision of validation logic. For those of us used to ActiveModel validations with their numerous options, ifs, ons and unlesses, dry-validation is a way to make even the most complex validation cases easy to read and understand.

+});

Comparison With ActiveModel

As explained in the introduction, dry-validation focuses on explicitness, clarity and precision of validation logic. For those of us used to ActiveModel validations with their numerous options, ifs, ons and unlesses, dry-validation is a way to make even the most complex validation cases easy to read and understand.

But, how would we go about converting our ActiveModel validation code into dry-validation?

diff --git a/gems/dry-validation/0.13/comparison-with-activemodel/index.html.gz b/gems/dry-validation/0.13/comparison-with-activemodel/index.html.gz index 25ca72894e..f1d298eb14 100644 Binary files a/gems/dry-validation/0.13/comparison-with-activemodel/index.html.gz and b/gems/dry-validation/0.13/comparison-with-activemodel/index.html.gz differ diff --git a/gems/dry-validation/0.13/custom-predicates/index.html b/gems/dry-validation/0.13/custom-predicates/index.html index d719e4914f..0cf0fe25cc 100644 --- a/gems/dry-validation/0.13/custom-predicates/index.html +++ b/gems/dry-validation/0.13/custom-predicates/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Custom Predicates

You can simply define predicate methods on your schema object:

schema = Dry::Validation.Schema do
   configure do
     def email?(value)
diff --git a/gems/dry-validation/0.13/custom-predicates/index.html.gz b/gems/dry-validation/0.13/custom-predicates/index.html.gz
index c3c7bfb162..83030b3b5f 100644
Binary files a/gems/dry-validation/0.13/custom-predicates/index.html.gz and b/gems/dry-validation/0.13/custom-predicates/index.html.gz differ
diff --git a/gems/dry-validation/0.13/custom-validation-blocks/index.html b/gems/dry-validation/0.13/custom-validation-blocks/index.html
index 1b3651a097..2faead5f3d 100644
--- a/gems/dry-validation/0.13/custom-validation-blocks/index.html
+++ b/gems/dry-validation/0.13/custom-validation-blocks/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Custom Validation Blocks

Just like high-level rules, custom validation blocks are executed only when the values they depend on are valid. You can define these blocks using validate DSL, they will be executed in the context of your schema objects, which means schema collaborators or external configurations are accessible within these blocks.

+});

Custom Validation Blocks

Just like high-level rules, custom validation blocks are executed only when the values they depend on are valid. You can define these blocks using validate DSL, they will be executed in the context of your schema objects, which means schema collaborators or external configurations are accessible within these blocks.

UserSchema = Dry::Validation.Params do
   configure do
     option :ids
diff --git a/gems/dry-validation/0.13/custom-validation-blocks/index.html.gz b/gems/dry-validation/0.13/custom-validation-blocks/index.html.gz
index f24fbd2b90..16200cf470 100644
Binary files a/gems/dry-validation/0.13/custom-validation-blocks/index.html.gz and b/gems/dry-validation/0.13/custom-validation-blocks/index.html.gz differ
diff --git a/gems/dry-validation/0.13/dynamic-predicate-arguments/index.html b/gems/dry-validation/0.13/dynamic-predicate-arguments/index.html
index 19f7077083..9476193e8e 100644
--- a/gems/dry-validation/0.13/dynamic-predicate-arguments/index.html
+++ b/gems/dry-validation/0.13/dynamic-predicate-arguments/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Dynamic Predicate Arguments

It's often the case that arguments that are passed to predicates are not known in the moment of defining a schema rules. If you need to calculate some arguments dynamically at run-time, you can simply define methods in your schema and refer to them in the DSL:

+});

Dynamic Predicate Arguments

It's often the case that arguments that are passed to predicates are not known in the moment of defining a schema rules. If you need to calculate some arguments dynamically at run-time, you can simply define methods in your schema and refer to them in the DSL:

DataSchema = Dry::Validation.Schema do
   configure do
     def data
diff --git a/gems/dry-validation/0.13/dynamic-predicate-arguments/index.html.gz b/gems/dry-validation/0.13/dynamic-predicate-arguments/index.html.gz
index 5eeb4875b3..6fd1cc53a8 100644
Binary files a/gems/dry-validation/0.13/dynamic-predicate-arguments/index.html.gz and b/gems/dry-validation/0.13/dynamic-predicate-arguments/index.html.gz differ
diff --git a/gems/dry-validation/0.13/error-messages/index.html b/gems/dry-validation/0.13/error-messages/index.html
index 241c5ea5be..5cf50d564d 100644
--- a/gems/dry-validation/0.13/error-messages/index.html
+++ b/gems/dry-validation/0.13/error-messages/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Error Messages

By default dry-validation comes with a set of pre-defined error messages for every built-in predicate. They are defined in a yaml file which is shipped with the gem. This file is compatible with I18n format.

+});

Error Messages

By default dry-validation comes with a set of pre-defined error messages for every built-in predicate. They are defined in a yaml file which is shipped with the gem. This file is compatible with I18n format.

You can provide your own messages and configure your schemas to use it like that:

schema = Dry::Validation.Schema do
diff --git a/gems/dry-validation/0.13/error-messages/index.html.gz b/gems/dry-validation/0.13/error-messages/index.html.gz
index 4331e8b5b6..1767f9b965 100644
Binary files a/gems/dry-validation/0.13/error-messages/index.html.gz and b/gems/dry-validation/0.13/error-messages/index.html.gz differ
diff --git a/gems/dry-validation/0.13/extensions/index.html b/gems/dry-validation/0.13/extensions/index.html
index 1e4ae79fc2..4bc10164db 100644
--- a/gems/dry-validation/0.13/extensions/index.html
+++ b/gems/dry-validation/0.13/extensions/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Extensions

dry-validation can be extended with extension. Those extensions are loaded with Dry::Validation.load_extensions.

Extensions available:

diff --git a/gems/dry-validation/0.13/extensions/index.html.gz b/gems/dry-validation/0.13/extensions/index.html.gz index d813b74a56..41161fab10 100644 Binary files a/gems/dry-validation/0.13/extensions/index.html.gz and b/gems/dry-validation/0.13/extensions/index.html.gz differ diff --git a/gems/dry-validation/0.13/extensions/monads/index.html b/gems/dry-validation/0.13/extensions/monads/index.html index cd867b977f..28bab6016b 100644 --- a/gems/dry-validation/0.13/extensions/monads/index.html +++ b/gems/dry-validation/0.13/extensions/monads/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Monads

This extension add a new method (#to_monad) to validation result.

Dry::Validation.load_extensions(:monads)
 
 schema = Dry::Validation.Schema { required(:name).filled(:str?, size?: 2..4) }
diff --git a/gems/dry-validation/0.13/extensions/monads/index.html.gz b/gems/dry-validation/0.13/extensions/monads/index.html.gz
index 5b9b552125..a615ebd746 100644
Binary files a/gems/dry-validation/0.13/extensions/monads/index.html.gz and b/gems/dry-validation/0.13/extensions/monads/index.html.gz differ
diff --git a/gems/dry-validation/0.13/extensions/struct/index.html b/gems/dry-validation/0.13/extensions/struct/index.html
index a09f54589a..4f28e77b3c 100644
--- a/gems/dry-validation/0.13/extensions/struct/index.html
+++ b/gems/dry-validation/0.13/extensions/struct/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Struct

This extension allows schema to use dry-struct

Dry::Validation.load_extensions(:struct)
 
 class Name < Dry::Struct::Value
diff --git a/gems/dry-validation/0.13/extensions/struct/index.html.gz b/gems/dry-validation/0.13/extensions/struct/index.html.gz
index 7e08ece8c0..badc5e3fad 100644
Binary files a/gems/dry-validation/0.13/extensions/struct/index.html.gz and b/gems/dry-validation/0.13/extensions/struct/index.html.gz differ
diff --git a/gems/dry-validation/0.13/forms/index.html b/gems/dry-validation/0.13/forms/index.html
index e143f114ad..f22480bc75 100644
--- a/gems/dry-validation/0.13/forms/index.html
+++ b/gems/dry-validation/0.13/forms/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Form Validation

Probably the most common use case is to validate form params. This is a special kind of a validation for a couple of reasons:

  • The input is a hash with stringified keys
  • diff --git a/gems/dry-validation/0.13/forms/index.html.gz b/gems/dry-validation/0.13/forms/index.html.gz index ba1328d9a3..a33a334ee6 100644 Binary files a/gems/dry-validation/0.13/forms/index.html.gz and b/gems/dry-validation/0.13/forms/index.html.gz differ diff --git a/gems/dry-validation/0.13/high-level-rules/index.html b/gems/dry-validation/0.13/high-level-rules/index.html index 0a889f845c..dc861ba1e3 100644 --- a/gems/dry-validation/0.13/high-level-rules/index.html +++ b/gems/dry-validation/0.13/high-level-rules/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

High-level Rules

Often it is not enough to define simple type-checking rules. In addition to those you need to be able to specify higher-level rules that rely on other rules. This can be achieved using the rule interface which can access already defined rules for specific keys.

+});

High-level Rules

Often it is not enough to define simple type-checking rules. In addition to those you need to be able to specify higher-level rules that rely on other rules. This can be achieved using the rule interface which can access already defined rules for specific keys.

For example let's say we have a schema with 3 keys, :barcode, :job_number and :sample_number and we need to make sure that when barcode is provided both job and sample numbers are not provided. The low-level checks need to make sure that individual values have the correct state and on top of those we can define our high-level rule:

schema = Dry::Validation.Schema do
diff --git a/gems/dry-validation/0.13/high-level-rules/index.html.gz b/gems/dry-validation/0.13/high-level-rules/index.html.gz
index 3682a37e53..6d033e0f16 100644
Binary files a/gems/dry-validation/0.13/high-level-rules/index.html.gz and b/gems/dry-validation/0.13/high-level-rules/index.html.gz differ
diff --git a/gems/dry-validation/0.13/index.html b/gems/dry-validation/0.13/index.html
index 33cee2234f..9eee535efb 100644
--- a/gems/dry-validation/0.13/index.html
+++ b/gems/dry-validation/0.13/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

Unlike other, well known, validation solutions in Ruby, dry-validation takes a different approach and focuses a lot on explicitness, clarity and precision of validation logic. It is designed to work with any data input, whether it's a simple hash, an array or a complex object with deeply nested data.

+});

Introduction

Unlike other, well known, validation solutions in Ruby, dry-validation takes a different approach and focuses a lot on explicitness, clarity and precision of validation logic. It is designed to work with any data input, whether it's a simple hash, an array or a complex object with deeply nested data.

It is based on the idea that each validation is encapsulated by a simple, stateless predicate that receives some input and returns either true or false. Those predicates are encapsulated by rules which can be composed together using predicate logic. This means you can use the common logic operators to build up a validation schema.

diff --git a/gems/dry-validation/0.13/index.html.gz b/gems/dry-validation/0.13/index.html.gz index 24f0ad78a5..17a2128411 100644 Binary files a/gems/dry-validation/0.13/index.html.gz and b/gems/dry-validation/0.13/index.html.gz differ diff --git a/gems/dry-validation/0.13/input-preprocessing/index.html b/gems/dry-validation/0.13/input-preprocessing/index.html index eddd1be78c..649291af9e 100644 --- a/gems/dry-validation/0.13/input-preprocessing/index.html +++ b/gems/dry-validation/0.13/input-preprocessing/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Optional Keys and Values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which can give you precise errors when a key was missing or key was present but the value was nil.

+});

Optional Keys and Values

We make a clear distinction between specifying an optional key and an optional value. This gives you a way of being very specific about validation rules. You can define a schema which can give you precise errors when a key was missing or key was present but the value was nil.

This also comes with the benefit of being explicit about the type expectation. In the example below we explicitly state that :age can be omitted or if present it must be an integer and it must be greater than 18.

diff --git a/gems/dry-validation/0.13/optional-keys-and-values/index.html.gz b/gems/dry-validation/0.13/optional-keys-and-values/index.html.gz index 60b1bac8f6..b83c7f8126 100644 Binary files a/gems/dry-validation/0.13/optional-keys-and-values/index.html.gz and b/gems/dry-validation/0.13/optional-keys-and-values/index.html.gz differ diff --git a/gems/dry-validation/0.13/reusing-schemas/index.html b/gems/dry-validation/0.13/reusing-schemas/index.html index 13ffbfca3e..044f097924 100644 --- a/gems/dry-validation/0.13/reusing-schemas/index.html +++ b/gems/dry-validation/0.13/reusing-schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Reusing Schemas

You can easily reuse existing schemas using nested-schema syntax:

AddressSchema = Dry::Validation.Schema do
   required(:street).filled
   required(:city).filled
diff --git a/gems/dry-validation/0.13/reusing-schemas/index.html.gz b/gems/dry-validation/0.13/reusing-schemas/index.html.gz
index 8582806051..c7cb214d15 100644
Binary files a/gems/dry-validation/0.13/reusing-schemas/index.html.gz and b/gems/dry-validation/0.13/reusing-schemas/index.html.gz differ
diff --git a/gems/dry-validation/0.13/type-specs/index.html b/gems/dry-validation/0.13/type-specs/index.html
index 02a9fb8735..7094b94742 100644
--- a/gems/dry-validation/0.13/type-specs/index.html
+++ b/gems/dry-validation/0.13/type-specs/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Explicit type specs

Default behavior for coercions is to automatically infer it from rule definitions. It’s smart and reduces code duplication; however, it turned out to be extremely slow. Furthermore, it is an implicit behavior that we don’t really like. That’s why it’s been decided that we’ll be separating coercions from validation rules for 1.0.0. This release is the first step in that direction. Final API is not yet discovered, ideas and feedback are much appreciated!

+});

Explicit type specs

Default behavior for coercions is to automatically infer it from rule definitions. It’s smart and reduces code duplication; however, it turned out to be extremely slow. Furthermore, it is an implicit behavior that we don’t really like. That’s why it’s been decided that we’ll be separating coercions from validation rules for 1.0.0. This release is the first step in that direction. Final API is not yet discovered, ideas and feedback are much appreciated!

To enable explicit type specifications, which will be used to configure coercion, you need to configure your schema:

UserSchema = Dry::Validation.Params do
diff --git a/gems/dry-validation/0.13/type-specs/index.html.gz b/gems/dry-validation/0.13/type-specs/index.html.gz
index fd8a9844c3..d4d852310e 100644
Binary files a/gems/dry-validation/0.13/type-specs/index.html.gz and b/gems/dry-validation/0.13/type-specs/index.html.gz differ
diff --git a/gems/dry-validation/1.0/configuration/index.html b/gems/dry-validation/1.0/configuration/index.html
index a44ba0c1b1..f713886711 100644
--- a/gems/dry-validation/1.0/configuration/index.html
+++ b/gems/dry-validation/1.0/configuration/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Configuration

Contract classes can be configured using their config object. You'll usually want to define an abstract contract class that all your other classes will inherit from. This way you can share common configuration between many contracts with no duplication.

+});

Extensions

Monads

diff --git a/gems/dry-validation/1.0/extensions/index.html.gz b/gems/dry-validation/1.0/extensions/index.html.gz index aac8bf9571..ead56542f0 100644 Binary files a/gems/dry-validation/1.0/extensions/index.html.gz and b/gems/dry-validation/1.0/extensions/index.html.gz differ diff --git a/gems/dry-validation/1.0/external-dependencies/index.html b/gems/dry-validation/1.0/external-dependencies/index.html index 3f6ba48345..61606f8580 100644 --- a/gems/dry-validation/1.0/external-dependencies/index.html +++ b/gems/dry-validation/1.0/external-dependencies/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

+});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

Let's say you use an API client object that can perform address validation - we can define it as an external dependency that will be injected to the contract's constructor:

class NewUserContract < Dry::Validation::Contract
diff --git a/gems/dry-validation/1.0/external-dependencies/index.html.gz b/gems/dry-validation/1.0/external-dependencies/index.html.gz
index 74b1858501..acc160d364 100644
Binary files a/gems/dry-validation/1.0/external-dependencies/index.html.gz and b/gems/dry-validation/1.0/external-dependencies/index.html.gz differ
diff --git a/gems/dry-validation/1.0/index.html b/gems/dry-validation/1.0/index.html
index 1864774bb7..74e2e591c5 100644
--- a/gems/dry-validation/1.0/index.html
+++ b/gems/dry-validation/1.0/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-validation is a data validation library that provides a powerful DSL for defining schemas and validation rules.

+});

Macros

This is an experimental feature and its API may change before 2.0.0

diff --git a/gems/dry-validation/1.0/macros/index.html.gz b/gems/dry-validation/1.0/macros/index.html.gz index 3afdbc1599..5d571a676b 100644 Binary files a/gems/dry-validation/1.0/macros/index.html.gz and b/gems/dry-validation/1.0/macros/index.html.gz differ diff --git a/gems/dry-validation/1.0/messages/index.html b/gems/dry-validation/1.0/messages/index.html index 44fe45356c..15bd8cc95e 100644 --- a/gems/dry-validation/1.0/messages/index.html +++ b/gems/dry-validation/1.0/messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Messages

Messages in failure API can be set in 4 different ways:

+});

Messages

Messages in failure API can be set in 4 different ways:

  • By passing a message string explicitly - the simplest way; however, using locales is a cleaner solution even if you don't have a multi-language system
  • diff --git a/gems/dry-validation/1.0/messages/index.html.gz b/gems/dry-validation/1.0/messages/index.html.gz index 35e047134b..f3214c4ad8 100644 Binary files a/gems/dry-validation/1.0/messages/index.html.gz and b/gems/dry-validation/1.0/messages/index.html.gz differ diff --git a/gems/dry-validation/1.0/rules/index.html b/gems/dry-validation/1.0/rules/index.html index e5c5f3027f..78bb0845cc 100644 --- a/gems/dry-validation/1.0/rules/index.html +++ b/gems/dry-validation/1.0/rules/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

+});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

When you apply a contract, it will process the input data using its schema, and then apply its rules one-by-one, in the same order as you defined them.

diff --git a/gems/dry-validation/1.0/rules/index.html.gz b/gems/dry-validation/1.0/rules/index.html.gz index 1e0ca8d654..66fd032294 100644 Binary files a/gems/dry-validation/1.0/rules/index.html.gz and b/gems/dry-validation/1.0/rules/index.html.gz differ diff --git a/gems/dry-validation/1.0/schemas/index.html b/gems/dry-validation/1.0/schemas/index.html index 1d832ff7c7..d24350280e 100644 --- a/gems/dry-validation/1.0/schemas/index.html +++ b/gems/dry-validation/1.0/schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Schemas

Schemas are a crucial part of dry-validation, they pre-process the data before it's validated by the rules and can provide detailed error messages. By default, the exposed DSL for defining schemas uses dry-schema under the hood.

+});

Configuration

Contract classes can be configured using their config object. You'll usually want to define an abstract contract class that all your other classes will inherit from. This way you can share common configuration between many contracts with no duplication.

+});

Extensions

Monads

diff --git a/gems/dry-validation/1.1/extensions/index.html.gz b/gems/dry-validation/1.1/extensions/index.html.gz index 1e454d2927..9a5e7330d4 100644 Binary files a/gems/dry-validation/1.1/extensions/index.html.gz and b/gems/dry-validation/1.1/extensions/index.html.gz differ diff --git a/gems/dry-validation/1.1/external-dependencies/index.html b/gems/dry-validation/1.1/external-dependencies/index.html index 70e54d64a8..d01617199e 100644 --- a/gems/dry-validation/1.1/external-dependencies/index.html +++ b/gems/dry-validation/1.1/external-dependencies/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

+});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

Let's say you use an API client object that can perform address validation - we can define it as an external dependency that will be injected to the contract's constructor:

class NewUserContract < Dry::Validation::Contract
diff --git a/gems/dry-validation/1.1/external-dependencies/index.html.gz b/gems/dry-validation/1.1/external-dependencies/index.html.gz
index 1415c3c42a..9d7cca1278 100644
Binary files a/gems/dry-validation/1.1/external-dependencies/index.html.gz and b/gems/dry-validation/1.1/external-dependencies/index.html.gz differ
diff --git a/gems/dry-validation/1.1/index.html b/gems/dry-validation/1.1/index.html
index a4251fcd8c..b55b4e773c 100644
--- a/gems/dry-validation/1.1/index.html
+++ b/gems/dry-validation/1.1/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-validation is a data validation library that provides a powerful DSL for defining schemas and validation rules.

+});

Macros

This is an experimental feature and its API may change before 2.0.0

diff --git a/gems/dry-validation/1.1/macros/index.html.gz b/gems/dry-validation/1.1/macros/index.html.gz index c64ccc0711..4fc22c3338 100644 Binary files a/gems/dry-validation/1.1/macros/index.html.gz and b/gems/dry-validation/1.1/macros/index.html.gz differ diff --git a/gems/dry-validation/1.1/messages/index.html b/gems/dry-validation/1.1/messages/index.html index 05e62aca7c..94b09d5739 100644 --- a/gems/dry-validation/1.1/messages/index.html +++ b/gems/dry-validation/1.1/messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Messages

Messages in failure API can be set in 4 different ways:

+});

Messages

Messages in failure API can be set in 4 different ways:

  • By passing a message string explicitly - the simplest way; however, using locales is a cleaner solution even if you don't have a multi-language system
  • diff --git a/gems/dry-validation/1.1/messages/index.html.gz b/gems/dry-validation/1.1/messages/index.html.gz index 18e0ed2e35..ca15910982 100644 Binary files a/gems/dry-validation/1.1/messages/index.html.gz and b/gems/dry-validation/1.1/messages/index.html.gz differ diff --git a/gems/dry-validation/1.1/rules/index.html b/gems/dry-validation/1.1/rules/index.html index 0e5836727a..bbff3138d7 100644 --- a/gems/dry-validation/1.1/rules/index.html +++ b/gems/dry-validation/1.1/rules/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

+});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

When you apply a contract, it will process the input data using its schema, and then apply its rules one-by-one, in the same order as you defined them.

diff --git a/gems/dry-validation/1.1/rules/index.html.gz b/gems/dry-validation/1.1/rules/index.html.gz index 11307fdb23..f2761c718c 100644 Binary files a/gems/dry-validation/1.1/rules/index.html.gz and b/gems/dry-validation/1.1/rules/index.html.gz differ diff --git a/gems/dry-validation/1.1/schemas/index.html b/gems/dry-validation/1.1/schemas/index.html index fdd82ec6fd..cdac7c7e4c 100644 --- a/gems/dry-validation/1.1/schemas/index.html +++ b/gems/dry-validation/1.1/schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Schemas

Schemas are a crucial part of dry-validation, they pre-process the data before it's validated by the rules and can provide detailed error messages. By default, the exposed DSL for defining schemas uses dry-schema under the hood.

+});

Configuration

Contract classes can be configured using their config object. You'll usually want to define an abstract contract class that all your other classes will inherit from. This way you can share common configuration between many contracts with no duplication.

+});

Extensions

Monads

diff --git a/gems/dry-validation/1.10/extensions/index.html.gz b/gems/dry-validation/1.10/extensions/index.html.gz index 7ca74bf2b1..a82f3bc682 100644 Binary files a/gems/dry-validation/1.10/extensions/index.html.gz and b/gems/dry-validation/1.10/extensions/index.html.gz differ diff --git a/gems/dry-validation/1.10/external-dependencies/index.html b/gems/dry-validation/1.10/external-dependencies/index.html index 95957720a8..4baf7f5ec5 100644 --- a/gems/dry-validation/1.10/external-dependencies/index.html +++ b/gems/dry-validation/1.10/external-dependencies/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

+});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

The option method is provided by dry-initializer.

diff --git a/gems/dry-validation/1.10/external-dependencies/index.html.gz b/gems/dry-validation/1.10/external-dependencies/index.html.gz index 54f8f08c9c..514cc04840 100644 Binary files a/gems/dry-validation/1.10/external-dependencies/index.html.gz and b/gems/dry-validation/1.10/external-dependencies/index.html.gz differ diff --git a/gems/dry-validation/1.10/index.html b/gems/dry-validation/1.10/index.html index 68cd434fb0..b872ec1be9 100644 --- a/gems/dry-validation/1.10/index.html +++ b/gems/dry-validation/1.10/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-validation is a data validation library that provides a powerful DSL for defining schemas and validation rules.

+});

Macros

This is an experimental feature and its API may change before 2.0.0

diff --git a/gems/dry-validation/1.10/macros/index.html.gz b/gems/dry-validation/1.10/macros/index.html.gz index e38bf2e4e2..2b0a64946f 100644 Binary files a/gems/dry-validation/1.10/macros/index.html.gz and b/gems/dry-validation/1.10/macros/index.html.gz differ diff --git a/gems/dry-validation/1.10/messages/index.html b/gems/dry-validation/1.10/messages/index.html index cf0ae1dd5d..85a58d5ee9 100644 --- a/gems/dry-validation/1.10/messages/index.html +++ b/gems/dry-validation/1.10/messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Messages

Messages in failure API can be set in 3 different ways:

+});

Messages

Messages in failure API can be set in 3 different ways:

  • By passing a message string explicitly - the simplest way; however, using locales is a cleaner solution even if you don't have a multi-language system
  • diff --git a/gems/dry-validation/1.10/messages/index.html.gz b/gems/dry-validation/1.10/messages/index.html.gz index 9cb95234c8..8db097401a 100644 Binary files a/gems/dry-validation/1.10/messages/index.html.gz and b/gems/dry-validation/1.10/messages/index.html.gz differ diff --git a/gems/dry-validation/1.10/pattern-matching/index.html b/gems/dry-validation/1.10/pattern-matching/index.html index ef41699e49..4ef930cbf8 100644 --- a/gems/dry-validation/1.10/pattern-matching/index.html +++ b/gems/dry-validation/1.10/pattern-matching/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Pattern matching

Ruby 2.7 added experimental support for pattern matching. dry-validation supports pattern matching on result values starting with 1.4.1.

+});

Pattern matching

Ruby 2.7 added experimental support for pattern matching. dry-validation supports pattern matching on result values starting with 1.4.1.

class PersonContract < Dry::Validation::Contract
   params do
     required(:first_name).filled(:string)
diff --git a/gems/dry-validation/1.10/pattern-matching/index.html.gz b/gems/dry-validation/1.10/pattern-matching/index.html.gz
index a19ed9a1f3..89125958a7 100644
Binary files a/gems/dry-validation/1.10/pattern-matching/index.html.gz and b/gems/dry-validation/1.10/pattern-matching/index.html.gz differ
diff --git a/gems/dry-validation/1.10/rules/index.html b/gems/dry-validation/1.10/rules/index.html
index 0dcf1ff202..cb757e0e0d 100644
--- a/gems/dry-validation/1.10/rules/index.html
+++ b/gems/dry-validation/1.10/rules/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

+});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

When you apply a contract, it will process the input data using its schema, and then apply its rules one-by-one, in the same order as you defined them.

diff --git a/gems/dry-validation/1.10/rules/index.html.gz b/gems/dry-validation/1.10/rules/index.html.gz index bfdf91d804..80d805b24a 100644 Binary files a/gems/dry-validation/1.10/rules/index.html.gz and b/gems/dry-validation/1.10/rules/index.html.gz differ diff --git a/gems/dry-validation/1.10/schemas/index.html b/gems/dry-validation/1.10/schemas/index.html index 63471cd745..db7551021a 100644 --- a/gems/dry-validation/1.10/schemas/index.html +++ b/gems/dry-validation/1.10/schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Schemas

Schemas are a crucial part of dry-validation, they pre-process the data before it's validated by the rules and can provide detailed error messages. By default, the exposed DSL for defining schemas uses dry-schema under the hood.

+});

Configuration

Contract classes can be configured using their config object. You'll usually want to define an abstract contract class that all your other classes will inherit from. This way you can share common configuration between many contracts with no duplication.

+});

Extensions

Monads

diff --git a/gems/dry-validation/1.2/extensions/index.html.gz b/gems/dry-validation/1.2/extensions/index.html.gz index 3cfa9cbda7..f6b37b7e98 100644 Binary files a/gems/dry-validation/1.2/extensions/index.html.gz and b/gems/dry-validation/1.2/extensions/index.html.gz differ diff --git a/gems/dry-validation/1.2/external-dependencies/index.html b/gems/dry-validation/1.2/external-dependencies/index.html index 205ab5e052..54f6135d92 100644 --- a/gems/dry-validation/1.2/external-dependencies/index.html +++ b/gems/dry-validation/1.2/external-dependencies/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

+});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

Let's say you use an API client object that can perform address validation - we can define it as an external dependency that will be injected to the contract's constructor:

class NewUserContract < Dry::Validation::Contract
diff --git a/gems/dry-validation/1.2/external-dependencies/index.html.gz b/gems/dry-validation/1.2/external-dependencies/index.html.gz
index baa08799f4..376d17ca33 100644
Binary files a/gems/dry-validation/1.2/external-dependencies/index.html.gz and b/gems/dry-validation/1.2/external-dependencies/index.html.gz differ
diff --git a/gems/dry-validation/1.2/index.html b/gems/dry-validation/1.2/index.html
index 70a373d073..c0fabd7685 100644
--- a/gems/dry-validation/1.2/index.html
+++ b/gems/dry-validation/1.2/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-validation is a data validation library that provides a powerful DSL for defining schemas and validation rules.

+});

Macros

This is an experimental feature and its API may change before 2.0.0

diff --git a/gems/dry-validation/1.2/macros/index.html.gz b/gems/dry-validation/1.2/macros/index.html.gz index ce32f22e57..a64f955bda 100644 Binary files a/gems/dry-validation/1.2/macros/index.html.gz and b/gems/dry-validation/1.2/macros/index.html.gz differ diff --git a/gems/dry-validation/1.2/messages/index.html b/gems/dry-validation/1.2/messages/index.html index 44d94ce76e..f5710cf2fd 100644 --- a/gems/dry-validation/1.2/messages/index.html +++ b/gems/dry-validation/1.2/messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Messages

Messages in failure API can be set in 4 different ways:

+});

Messages

Messages in failure API can be set in 4 different ways:

  • By passing a message string explicitly - the simplest way; however, using locales is a cleaner solution even if you don't have a multi-language system
  • diff --git a/gems/dry-validation/1.2/messages/index.html.gz b/gems/dry-validation/1.2/messages/index.html.gz index f8467ed1d5..846b9acc8e 100644 Binary files a/gems/dry-validation/1.2/messages/index.html.gz and b/gems/dry-validation/1.2/messages/index.html.gz differ diff --git a/gems/dry-validation/1.2/rules/index.html b/gems/dry-validation/1.2/rules/index.html index 82f36f8443..85e35c5362 100644 --- a/gems/dry-validation/1.2/rules/index.html +++ b/gems/dry-validation/1.2/rules/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

+});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

When you apply a contract, it will process the input data using its schema, and then apply its rules one-by-one, in the same order as you defined them.

diff --git a/gems/dry-validation/1.2/rules/index.html.gz b/gems/dry-validation/1.2/rules/index.html.gz index 92a06a324f..e07d907174 100644 Binary files a/gems/dry-validation/1.2/rules/index.html.gz and b/gems/dry-validation/1.2/rules/index.html.gz differ diff --git a/gems/dry-validation/1.2/schemas/index.html b/gems/dry-validation/1.2/schemas/index.html index 1b62308d88..bf949c8bbf 100644 --- a/gems/dry-validation/1.2/schemas/index.html +++ b/gems/dry-validation/1.2/schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Schemas

Schemas are a crucial part of dry-validation, they pre-process the data before it's validated by the rules and can provide detailed error messages. By default, the exposed DSL for defining schemas uses dry-schema under the hood.

+});

Configuration

Contract classes can be configured using their config object. You'll usually want to define an abstract contract class that all your other classes will inherit from. This way you can share common configuration between many contracts with no duplication.

+});

Extensions

Monads

diff --git a/gems/dry-validation/1.3/extensions/index.html.gz b/gems/dry-validation/1.3/extensions/index.html.gz index 720eb5edca..350dd933e5 100644 Binary files a/gems/dry-validation/1.3/extensions/index.html.gz and b/gems/dry-validation/1.3/extensions/index.html.gz differ diff --git a/gems/dry-validation/1.3/external-dependencies/index.html b/gems/dry-validation/1.3/external-dependencies/index.html index 3c9fc8b28a..fb652c51d4 100644 --- a/gems/dry-validation/1.3/external-dependencies/index.html +++ b/gems/dry-validation/1.3/external-dependencies/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

+});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

Let's say you use an API client object that can perform address validation - we can define it as an external dependency that will be injected to the contract's constructor:

class NewUserContract < Dry::Validation::Contract
diff --git a/gems/dry-validation/1.3/external-dependencies/index.html.gz b/gems/dry-validation/1.3/external-dependencies/index.html.gz
index 15b441e495..f09ab78ffd 100644
Binary files a/gems/dry-validation/1.3/external-dependencies/index.html.gz and b/gems/dry-validation/1.3/external-dependencies/index.html.gz differ
diff --git a/gems/dry-validation/1.3/index.html b/gems/dry-validation/1.3/index.html
index da02b66e70..caa7d321f6 100644
--- a/gems/dry-validation/1.3/index.html
+++ b/gems/dry-validation/1.3/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-validation is a data validation library that provides a powerful DSL for defining schemas and validation rules.

+});

Macros

This is an experimental feature and its API may change before 2.0.0

diff --git a/gems/dry-validation/1.3/macros/index.html.gz b/gems/dry-validation/1.3/macros/index.html.gz index 11526888de..d8a4b9bd9e 100644 Binary files a/gems/dry-validation/1.3/macros/index.html.gz and b/gems/dry-validation/1.3/macros/index.html.gz differ diff --git a/gems/dry-validation/1.3/messages/index.html b/gems/dry-validation/1.3/messages/index.html index e47f339817..10cc3e914f 100644 --- a/gems/dry-validation/1.3/messages/index.html +++ b/gems/dry-validation/1.3/messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Messages

Messages in failure API can be set in 4 different ways:

+});

Messages

Messages in failure API can be set in 4 different ways:

  • By passing a message string explicitly - the simplest way; however, using locales is a cleaner solution even if you don't have a multi-language system
  • diff --git a/gems/dry-validation/1.3/messages/index.html.gz b/gems/dry-validation/1.3/messages/index.html.gz index 7f8bfdf3ac..7dd16f3c74 100644 Binary files a/gems/dry-validation/1.3/messages/index.html.gz and b/gems/dry-validation/1.3/messages/index.html.gz differ diff --git a/gems/dry-validation/1.3/rules/index.html b/gems/dry-validation/1.3/rules/index.html index fa42a2e39a..b802ad93b4 100644 --- a/gems/dry-validation/1.3/rules/index.html +++ b/gems/dry-validation/1.3/rules/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

+});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

When you apply a contract, it will process the input data using its schema, and then apply its rules one-by-one, in the same order as you defined them.

diff --git a/gems/dry-validation/1.3/rules/index.html.gz b/gems/dry-validation/1.3/rules/index.html.gz index f4c9364bb5..724005e6bf 100644 Binary files a/gems/dry-validation/1.3/rules/index.html.gz and b/gems/dry-validation/1.3/rules/index.html.gz differ diff --git a/gems/dry-validation/1.3/schemas/index.html b/gems/dry-validation/1.3/schemas/index.html index 1c5852846f..7f297c0166 100644 --- a/gems/dry-validation/1.3/schemas/index.html +++ b/gems/dry-validation/1.3/schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Schemas

Schemas are a crucial part of dry-validation, they pre-process the data before it's validated by the rules and can provide detailed error messages. By default, the exposed DSL for defining schemas uses dry-schema under the hood.

+});

Configuration

Contract classes can be configured using their config object. You'll usually want to define an abstract contract class that all your other classes will inherit from. This way you can share common configuration between many contracts with no duplication.

+});

Extensions

Monads

diff --git a/gems/dry-validation/1.4/extensions/index.html.gz b/gems/dry-validation/1.4/extensions/index.html.gz index 1ab1f82c4d..aaf6791a2c 100644 Binary files a/gems/dry-validation/1.4/extensions/index.html.gz and b/gems/dry-validation/1.4/extensions/index.html.gz differ diff --git a/gems/dry-validation/1.4/external-dependencies/index.html b/gems/dry-validation/1.4/external-dependencies/index.html index 8a5bf233df..a9873b1467 100644 --- a/gems/dry-validation/1.4/external-dependencies/index.html +++ b/gems/dry-validation/1.4/external-dependencies/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

+});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

Let's say you use an API client object that can perform address validation - we can define it as an external dependency that will be injected to the contract's constructor:

class NewUserContract < Dry::Validation::Contract
diff --git a/gems/dry-validation/1.4/external-dependencies/index.html.gz b/gems/dry-validation/1.4/external-dependencies/index.html.gz
index 1d4b9f2606..26e9b3f160 100644
Binary files a/gems/dry-validation/1.4/external-dependencies/index.html.gz and b/gems/dry-validation/1.4/external-dependencies/index.html.gz differ
diff --git a/gems/dry-validation/1.4/index.html b/gems/dry-validation/1.4/index.html
index bd73edc123..24a64bb53a 100644
--- a/gems/dry-validation/1.4/index.html
+++ b/gems/dry-validation/1.4/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Introduction

dry-validation is a data validation library that provides a powerful DSL for defining schemas and validation rules.

+});

Macros

This is an experimental feature and its API may change before 2.0.0

diff --git a/gems/dry-validation/1.4/macros/index.html.gz b/gems/dry-validation/1.4/macros/index.html.gz index 69f31dea89..19753d358b 100644 Binary files a/gems/dry-validation/1.4/macros/index.html.gz and b/gems/dry-validation/1.4/macros/index.html.gz differ diff --git a/gems/dry-validation/1.4/messages/index.html b/gems/dry-validation/1.4/messages/index.html index c16ba3b333..4307119cdd 100644 --- a/gems/dry-validation/1.4/messages/index.html +++ b/gems/dry-validation/1.4/messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Messages

Messages in failure API can be set in 4 different ways:

+});

Messages

Messages in failure API can be set in 4 different ways:

  • By passing a message string explicitly - the simplest way; however, using locales is a cleaner solution even if you don't have a multi-language system
  • diff --git a/gems/dry-validation/1.4/messages/index.html.gz b/gems/dry-validation/1.4/messages/index.html.gz index 325d26c251..85e6806e7f 100644 Binary files a/gems/dry-validation/1.4/messages/index.html.gz and b/gems/dry-validation/1.4/messages/index.html.gz differ diff --git a/gems/dry-validation/1.4/pattern-matching/index.html b/gems/dry-validation/1.4/pattern-matching/index.html index 71d200134c..d46c6cb73c 100644 --- a/gems/dry-validation/1.4/pattern-matching/index.html +++ b/gems/dry-validation/1.4/pattern-matching/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Pattern matching

Ruby 2.7 added experimental support for pattern matching. dry-validation supports pattern matching on result values starting with 1.4.1.

+});

Pattern matching

Ruby 2.7 added experimental support for pattern matching. dry-validation supports pattern matching on result values starting with 1.4.1.

class PersonContract < Dry::Validation::Contract
   params do
     required(:first_name).filled(:string)
diff --git a/gems/dry-validation/1.4/pattern-matching/index.html.gz b/gems/dry-validation/1.4/pattern-matching/index.html.gz
index 8238ff35d6..dbe350d457 100644
Binary files a/gems/dry-validation/1.4/pattern-matching/index.html.gz and b/gems/dry-validation/1.4/pattern-matching/index.html.gz differ
diff --git a/gems/dry-validation/1.4/rules/index.html b/gems/dry-validation/1.4/rules/index.html
index 0d4b4bdac0..9fec5e8742 100644
--- a/gems/dry-validation/1.4/rules/index.html
+++ b/gems/dry-validation/1.4/rules/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

+});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

When you apply a contract, it will process the input data using its schema, and then apply its rules one-by-one, in the same order as you defined them.

diff --git a/gems/dry-validation/1.4/rules/index.html.gz b/gems/dry-validation/1.4/rules/index.html.gz index 13569bfd41..484d1be568 100644 Binary files a/gems/dry-validation/1.4/rules/index.html.gz and b/gems/dry-validation/1.4/rules/index.html.gz differ diff --git a/gems/dry-validation/1.4/schemas/index.html b/gems/dry-validation/1.4/schemas/index.html index 0b9230d6b4..f00643f0db 100644 --- a/gems/dry-validation/1.4/schemas/index.html +++ b/gems/dry-validation/1.4/schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Schemas

Schemas are a crucial part of dry-validation, they pre-process the data before it's validated by the rules and can provide detailed error messages. By default, the exposed DSL for defining schemas uses dry-schema under the hood.

+});

Configuration

Contract classes can be configured using their config object. You'll usually want to define an abstract contract class that all your other classes will inherit from. This way you can share common configuration between many contracts with no duplication.

+});

Extensions

Monads

diff --git a/gems/dry-validation/1.5/extensions/index.html.gz b/gems/dry-validation/1.5/extensions/index.html.gz index 59a0f77b04..824c1ea26b 100644 Binary files a/gems/dry-validation/1.5/extensions/index.html.gz and b/gems/dry-validation/1.5/extensions/index.html.gz differ diff --git a/gems/dry-validation/1.5/external-dependencies/index.html b/gems/dry-validation/1.5/external-dependencies/index.html index e110275882..b3c50e77ae 100644 --- a/gems/dry-validation/1.5/external-dependencies/index.html +++ b/gems/dry-validation/1.5/external-dependencies/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

+});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

The option method is provided by dry-initializer.

diff --git a/gems/dry-validation/1.5/external-dependencies/index.html.gz b/gems/dry-validation/1.5/external-dependencies/index.html.gz index 9cef7b7cd7..83dcc68062 100644 Binary files a/gems/dry-validation/1.5/external-dependencies/index.html.gz and b/gems/dry-validation/1.5/external-dependencies/index.html.gz differ diff --git a/gems/dry-validation/1.5/index.html b/gems/dry-validation/1.5/index.html index 567e563e64..6b9af0faa0 100644 --- a/gems/dry-validation/1.5/index.html +++ b/gems/dry-validation/1.5/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-validation is a data validation library that provides a powerful DSL for defining schemas and validation rules.

+});

Macros

This is an experimental feature and its API may change before 2.0.0

diff --git a/gems/dry-validation/1.5/macros/index.html.gz b/gems/dry-validation/1.5/macros/index.html.gz index 6f50a8ceb5..b8cbc2fc88 100644 Binary files a/gems/dry-validation/1.5/macros/index.html.gz and b/gems/dry-validation/1.5/macros/index.html.gz differ diff --git a/gems/dry-validation/1.5/messages/index.html b/gems/dry-validation/1.5/messages/index.html index 1f49502eb7..f29173f08b 100644 --- a/gems/dry-validation/1.5/messages/index.html +++ b/gems/dry-validation/1.5/messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Messages

Messages in failure API can be set in 4 different ways:

+});

Messages

Messages in failure API can be set in 4 different ways:

  • By passing a message string explicitly - the simplest way; however, using locales is a cleaner solution even if you don't have a multi-language system
  • diff --git a/gems/dry-validation/1.5/messages/index.html.gz b/gems/dry-validation/1.5/messages/index.html.gz index 6e8bc0b161..d025c30b5c 100644 Binary files a/gems/dry-validation/1.5/messages/index.html.gz and b/gems/dry-validation/1.5/messages/index.html.gz differ diff --git a/gems/dry-validation/1.5/pattern-matching/index.html b/gems/dry-validation/1.5/pattern-matching/index.html index ec42650cfe..edb686a670 100644 --- a/gems/dry-validation/1.5/pattern-matching/index.html +++ b/gems/dry-validation/1.5/pattern-matching/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Pattern matching

Ruby 2.7 added experimental support for pattern matching. dry-validation supports pattern matching on result values starting with 1.4.1.

+});

Pattern matching

Ruby 2.7 added experimental support for pattern matching. dry-validation supports pattern matching on result values starting with 1.4.1.

class PersonContract < Dry::Validation::Contract
   params do
     required(:first_name).filled(:string)
diff --git a/gems/dry-validation/1.5/pattern-matching/index.html.gz b/gems/dry-validation/1.5/pattern-matching/index.html.gz
index d09d38b1cb..a2769169f5 100644
Binary files a/gems/dry-validation/1.5/pattern-matching/index.html.gz and b/gems/dry-validation/1.5/pattern-matching/index.html.gz differ
diff --git a/gems/dry-validation/1.5/rules/index.html b/gems/dry-validation/1.5/rules/index.html
index ca6ba3e1d0..5c3305bca6 100644
--- a/gems/dry-validation/1.5/rules/index.html
+++ b/gems/dry-validation/1.5/rules/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

+});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

When you apply a contract, it will process the input data using its schema, and then apply its rules one-by-one, in the same order as you defined them.

diff --git a/gems/dry-validation/1.5/rules/index.html.gz b/gems/dry-validation/1.5/rules/index.html.gz index fcf0a5aa38..9bdd6ddb25 100644 Binary files a/gems/dry-validation/1.5/rules/index.html.gz and b/gems/dry-validation/1.5/rules/index.html.gz differ diff --git a/gems/dry-validation/1.5/schemas/index.html b/gems/dry-validation/1.5/schemas/index.html index 903ef8e992..d2b83d31af 100644 --- a/gems/dry-validation/1.5/schemas/index.html +++ b/gems/dry-validation/1.5/schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Schemas

Schemas are a crucial part of dry-validation, they pre-process the data before it's validated by the rules and can provide detailed error messages. By default, the exposed DSL for defining schemas uses dry-schema under the hood.

+});

Configuration

Contract classes can be configured using their config object. You'll usually want to define an abstract contract class that all your other classes will inherit from. This way you can share common configuration between many contracts with no duplication.

+});

Extensions

Monads

diff --git a/gems/dry-validation/1.6/extensions/index.html.gz b/gems/dry-validation/1.6/extensions/index.html.gz index ab409ed6bc..873c561176 100644 Binary files a/gems/dry-validation/1.6/extensions/index.html.gz and b/gems/dry-validation/1.6/extensions/index.html.gz differ diff --git a/gems/dry-validation/1.6/external-dependencies/index.html b/gems/dry-validation/1.6/external-dependencies/index.html index 77791eb864..2c65e1a477 100644 --- a/gems/dry-validation/1.6/external-dependencies/index.html +++ b/gems/dry-validation/1.6/external-dependencies/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

+});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

The option method is provided by dry-initializer.

diff --git a/gems/dry-validation/1.6/external-dependencies/index.html.gz b/gems/dry-validation/1.6/external-dependencies/index.html.gz index b3420aa014..819712dd74 100644 Binary files a/gems/dry-validation/1.6/external-dependencies/index.html.gz and b/gems/dry-validation/1.6/external-dependencies/index.html.gz differ diff --git a/gems/dry-validation/1.6/index.html b/gems/dry-validation/1.6/index.html index accff9c405..7c7aff31c7 100644 --- a/gems/dry-validation/1.6/index.html +++ b/gems/dry-validation/1.6/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-validation is a data validation library that provides a powerful DSL for defining schemas and validation rules.

+});

Macros

This is an experimental feature and its API may change before 2.0.0

diff --git a/gems/dry-validation/1.6/macros/index.html.gz b/gems/dry-validation/1.6/macros/index.html.gz index 6b9da34cff..7fa0df7b73 100644 Binary files a/gems/dry-validation/1.6/macros/index.html.gz and b/gems/dry-validation/1.6/macros/index.html.gz differ diff --git a/gems/dry-validation/1.6/messages/index.html b/gems/dry-validation/1.6/messages/index.html index 4db8c129f8..93a5883bd6 100644 --- a/gems/dry-validation/1.6/messages/index.html +++ b/gems/dry-validation/1.6/messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Messages

Messages in failure API can be set in 4 different ways:

+});

Messages

Messages in failure API can be set in 4 different ways:

  • By passing a message string explicitly - the simplest way; however, using locales is a cleaner solution even if you don't have a multi-language system
  • diff --git a/gems/dry-validation/1.6/messages/index.html.gz b/gems/dry-validation/1.6/messages/index.html.gz index 7d57ec6d3a..4c992a720b 100644 Binary files a/gems/dry-validation/1.6/messages/index.html.gz and b/gems/dry-validation/1.6/messages/index.html.gz differ diff --git a/gems/dry-validation/1.6/pattern-matching/index.html b/gems/dry-validation/1.6/pattern-matching/index.html index e0022848d1..d87db3a12f 100644 --- a/gems/dry-validation/1.6/pattern-matching/index.html +++ b/gems/dry-validation/1.6/pattern-matching/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Pattern matching

Ruby 2.7 added experimental support for pattern matching. dry-validation supports pattern matching on result values starting with 1.4.1.

+});

Pattern matching

Ruby 2.7 added experimental support for pattern matching. dry-validation supports pattern matching on result values starting with 1.4.1.

class PersonContract < Dry::Validation::Contract
   params do
     required(:first_name).filled(:string)
diff --git a/gems/dry-validation/1.6/pattern-matching/index.html.gz b/gems/dry-validation/1.6/pattern-matching/index.html.gz
index e57ae34941..5ec0fd6ac8 100644
Binary files a/gems/dry-validation/1.6/pattern-matching/index.html.gz and b/gems/dry-validation/1.6/pattern-matching/index.html.gz differ
diff --git a/gems/dry-validation/1.6/rules/index.html b/gems/dry-validation/1.6/rules/index.html
index 0d161df0fa..4244a50093 100644
--- a/gems/dry-validation/1.6/rules/index.html
+++ b/gems/dry-validation/1.6/rules/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

+});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

When you apply a contract, it will process the input data using its schema, and then apply its rules one-by-one, in the same order as you defined them.

diff --git a/gems/dry-validation/1.6/rules/index.html.gz b/gems/dry-validation/1.6/rules/index.html.gz index 8f06cae1ad..9cefd0398e 100644 Binary files a/gems/dry-validation/1.6/rules/index.html.gz and b/gems/dry-validation/1.6/rules/index.html.gz differ diff --git a/gems/dry-validation/1.6/schemas/index.html b/gems/dry-validation/1.6/schemas/index.html index 4b710af254..79d3d446a9 100644 --- a/gems/dry-validation/1.6/schemas/index.html +++ b/gems/dry-validation/1.6/schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Schemas

Schemas are a crucial part of dry-validation, they pre-process the data before it's validated by the rules and can provide detailed error messages. By default, the exposed DSL for defining schemas uses dry-schema under the hood.

+});

Configuration

Contract classes can be configured using their config object. You'll usually want to define an abstract contract class that all your other classes will inherit from. This way you can share common configuration between many contracts with no duplication.

+});

Extensions

Monads

diff --git a/gems/dry-validation/1.7/extensions/index.html.gz b/gems/dry-validation/1.7/extensions/index.html.gz index 9a18756da7..6603ee57d6 100644 Binary files a/gems/dry-validation/1.7/extensions/index.html.gz and b/gems/dry-validation/1.7/extensions/index.html.gz differ diff --git a/gems/dry-validation/1.7/external-dependencies/index.html b/gems/dry-validation/1.7/external-dependencies/index.html index e6602ed121..eb6a5c89ca 100644 --- a/gems/dry-validation/1.7/external-dependencies/index.html +++ b/gems/dry-validation/1.7/external-dependencies/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

+});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

The option method is provided by dry-initializer.

diff --git a/gems/dry-validation/1.7/external-dependencies/index.html.gz b/gems/dry-validation/1.7/external-dependencies/index.html.gz index 6e93870a4d..a0887744a2 100644 Binary files a/gems/dry-validation/1.7/external-dependencies/index.html.gz and b/gems/dry-validation/1.7/external-dependencies/index.html.gz differ diff --git a/gems/dry-validation/1.7/index.html b/gems/dry-validation/1.7/index.html index d21474ad37..76f302ac61 100644 --- a/gems/dry-validation/1.7/index.html +++ b/gems/dry-validation/1.7/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-validation is a data validation library that provides a powerful DSL for defining schemas and validation rules.

+});

Macros

This is an experimental feature and its API may change before 2.0.0

diff --git a/gems/dry-validation/1.7/macros/index.html.gz b/gems/dry-validation/1.7/macros/index.html.gz index f3dda378ff..d2c92eb3b0 100644 Binary files a/gems/dry-validation/1.7/macros/index.html.gz and b/gems/dry-validation/1.7/macros/index.html.gz differ diff --git a/gems/dry-validation/1.7/messages/index.html b/gems/dry-validation/1.7/messages/index.html index 311cbf8f96..45ecd7108d 100644 --- a/gems/dry-validation/1.7/messages/index.html +++ b/gems/dry-validation/1.7/messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Messages

Messages in failure API can be set in 4 different ways:

+});

Messages

Messages in failure API can be set in 4 different ways:

  • By passing a message string explicitly - the simplest way; however, using locales is a cleaner solution even if you don't have a multi-language system
  • diff --git a/gems/dry-validation/1.7/messages/index.html.gz b/gems/dry-validation/1.7/messages/index.html.gz index 4079247c82..b76f0d3058 100644 Binary files a/gems/dry-validation/1.7/messages/index.html.gz and b/gems/dry-validation/1.7/messages/index.html.gz differ diff --git a/gems/dry-validation/1.7/pattern-matching/index.html b/gems/dry-validation/1.7/pattern-matching/index.html index 7400412957..365f515970 100644 --- a/gems/dry-validation/1.7/pattern-matching/index.html +++ b/gems/dry-validation/1.7/pattern-matching/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Pattern matching

Ruby 2.7 added experimental support for pattern matching. dry-validation supports pattern matching on result values starting with 1.4.1.

+});

Pattern matching

Ruby 2.7 added experimental support for pattern matching. dry-validation supports pattern matching on result values starting with 1.4.1.

class PersonContract < Dry::Validation::Contract
   params do
     required(:first_name).filled(:string)
diff --git a/gems/dry-validation/1.7/pattern-matching/index.html.gz b/gems/dry-validation/1.7/pattern-matching/index.html.gz
index 9d0b847b0e..1b06d94ffd 100644
Binary files a/gems/dry-validation/1.7/pattern-matching/index.html.gz and b/gems/dry-validation/1.7/pattern-matching/index.html.gz differ
diff --git a/gems/dry-validation/1.7/rules/index.html b/gems/dry-validation/1.7/rules/index.html
index 4ed74a4624..deea03b779 100644
--- a/gems/dry-validation/1.7/rules/index.html
+++ b/gems/dry-validation/1.7/rules/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

+});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

When you apply a contract, it will process the input data using its schema, and then apply its rules one-by-one, in the same order as you defined them.

diff --git a/gems/dry-validation/1.7/rules/index.html.gz b/gems/dry-validation/1.7/rules/index.html.gz index 9357beb844..9139bfd2ea 100644 Binary files a/gems/dry-validation/1.7/rules/index.html.gz and b/gems/dry-validation/1.7/rules/index.html.gz differ diff --git a/gems/dry-validation/1.7/schemas/index.html b/gems/dry-validation/1.7/schemas/index.html index a2b78c37b1..f680b8959c 100644 --- a/gems/dry-validation/1.7/schemas/index.html +++ b/gems/dry-validation/1.7/schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Schemas

Schemas are a crucial part of dry-validation, they pre-process the data before it's validated by the rules and can provide detailed error messages. By default, the exposed DSL for defining schemas uses dry-schema under the hood.

+});

Configuration

Contract classes can be configured using their config object. You'll usually want to define an abstract contract class that all your other classes will inherit from. This way you can share common configuration between many contracts with no duplication.

+});

Extensions

Monads

diff --git a/gems/dry-validation/1.8/extensions/index.html.gz b/gems/dry-validation/1.8/extensions/index.html.gz index f9a8486e6e..bb119a1240 100644 Binary files a/gems/dry-validation/1.8/extensions/index.html.gz and b/gems/dry-validation/1.8/extensions/index.html.gz differ diff --git a/gems/dry-validation/1.8/external-dependencies/index.html b/gems/dry-validation/1.8/external-dependencies/index.html index dddc7bb11b..21444c251d 100644 --- a/gems/dry-validation/1.8/external-dependencies/index.html +++ b/gems/dry-validation/1.8/external-dependencies/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

+});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

The option method is provided by dry-initializer.

diff --git a/gems/dry-validation/1.8/external-dependencies/index.html.gz b/gems/dry-validation/1.8/external-dependencies/index.html.gz index 5693f34094..6c42938fba 100644 Binary files a/gems/dry-validation/1.8/external-dependencies/index.html.gz and b/gems/dry-validation/1.8/external-dependencies/index.html.gz differ diff --git a/gems/dry-validation/1.8/index.html b/gems/dry-validation/1.8/index.html index 2bdeabdef6..1afe8b2908 100644 --- a/gems/dry-validation/1.8/index.html +++ b/gems/dry-validation/1.8/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-validation is a data validation library that provides a powerful DSL for defining schemas and validation rules.

+});

Macros

This is an experimental feature and its API may change before 2.0.0

diff --git a/gems/dry-validation/1.8/macros/index.html.gz b/gems/dry-validation/1.8/macros/index.html.gz index 24e3f6ae53..7d7641255d 100644 Binary files a/gems/dry-validation/1.8/macros/index.html.gz and b/gems/dry-validation/1.8/macros/index.html.gz differ diff --git a/gems/dry-validation/1.8/messages/index.html b/gems/dry-validation/1.8/messages/index.html index e356a6009d..2a1bd8d8a8 100644 --- a/gems/dry-validation/1.8/messages/index.html +++ b/gems/dry-validation/1.8/messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Messages

Messages in failure API can be set in 3 different ways:

+});

Messages

Messages in failure API can be set in 3 different ways:

  • By passing a message string explicitly - the simplest way; however, using locales is a cleaner solution even if you don't have a multi-language system
  • diff --git a/gems/dry-validation/1.8/messages/index.html.gz b/gems/dry-validation/1.8/messages/index.html.gz index 23ec0cbf49..926d02ae65 100644 Binary files a/gems/dry-validation/1.8/messages/index.html.gz and b/gems/dry-validation/1.8/messages/index.html.gz differ diff --git a/gems/dry-validation/1.8/pattern-matching/index.html b/gems/dry-validation/1.8/pattern-matching/index.html index 273389808b..e9035bbd68 100644 --- a/gems/dry-validation/1.8/pattern-matching/index.html +++ b/gems/dry-validation/1.8/pattern-matching/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Pattern matching

Ruby 2.7 added experimental support for pattern matching. dry-validation supports pattern matching on result values starting with 1.4.1.

+});

Pattern matching

Ruby 2.7 added experimental support for pattern matching. dry-validation supports pattern matching on result values starting with 1.4.1.

class PersonContract < Dry::Validation::Contract
   params do
     required(:first_name).filled(:string)
diff --git a/gems/dry-validation/1.8/pattern-matching/index.html.gz b/gems/dry-validation/1.8/pattern-matching/index.html.gz
index c331c3ef8a..45bf2782d7 100644
Binary files a/gems/dry-validation/1.8/pattern-matching/index.html.gz and b/gems/dry-validation/1.8/pattern-matching/index.html.gz differ
diff --git a/gems/dry-validation/1.8/rules/index.html b/gems/dry-validation/1.8/rules/index.html
index 0f955e6b38..81cdc3d209 100644
--- a/gems/dry-validation/1.8/rules/index.html
+++ b/gems/dry-validation/1.8/rules/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

+});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

When you apply a contract, it will process the input data using its schema, and then apply its rules one-by-one, in the same order as you defined them.

diff --git a/gems/dry-validation/1.8/rules/index.html.gz b/gems/dry-validation/1.8/rules/index.html.gz index 20f22324a9..c34c2f5875 100644 Binary files a/gems/dry-validation/1.8/rules/index.html.gz and b/gems/dry-validation/1.8/rules/index.html.gz differ diff --git a/gems/dry-validation/1.8/schemas/index.html b/gems/dry-validation/1.8/schemas/index.html index 82e76fd6a5..7c80b6ff9e 100644 --- a/gems/dry-validation/1.8/schemas/index.html +++ b/gems/dry-validation/1.8/schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Schemas

Schemas are a crucial part of dry-validation, they pre-process the data before it's validated by the rules and can provide detailed error messages. By default, the exposed DSL for defining schemas uses dry-schema under the hood.

+});

Configuration

Contract classes can be configured using their config object. You'll usually want to define an abstract contract class that all your other classes will inherit from. This way you can share common configuration between many contracts with no duplication.

+});

Extensions

Monads

diff --git a/gems/dry-validation/1.9/extensions/index.html.gz b/gems/dry-validation/1.9/extensions/index.html.gz index 952a1d7b8b..601e4d936f 100644 Binary files a/gems/dry-validation/1.9/extensions/index.html.gz and b/gems/dry-validation/1.9/extensions/index.html.gz differ diff --git a/gems/dry-validation/1.9/external-dependencies/index.html b/gems/dry-validation/1.9/external-dependencies/index.html index ad75738fe9..46005781b5 100644 --- a/gems/dry-validation/1.9/external-dependencies/index.html +++ b/gems/dry-validation/1.9/external-dependencies/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

+});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

The option method is provided by dry-initializer.

diff --git a/gems/dry-validation/1.9/external-dependencies/index.html.gz b/gems/dry-validation/1.9/external-dependencies/index.html.gz index 69b9eb0f12..a6dddcc804 100644 Binary files a/gems/dry-validation/1.9/external-dependencies/index.html.gz and b/gems/dry-validation/1.9/external-dependencies/index.html.gz differ diff --git a/gems/dry-validation/1.9/index.html b/gems/dry-validation/1.9/index.html index 1911887ea2..d1fc5ad817 100644 --- a/gems/dry-validation/1.9/index.html +++ b/gems/dry-validation/1.9/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-validation is a data validation library that provides a powerful DSL for defining schemas and validation rules.

+});

Macros

This is an experimental feature and its API may change before 2.0.0

diff --git a/gems/dry-validation/1.9/macros/index.html.gz b/gems/dry-validation/1.9/macros/index.html.gz index 50e862a487..84e04f2fcb 100644 Binary files a/gems/dry-validation/1.9/macros/index.html.gz and b/gems/dry-validation/1.9/macros/index.html.gz differ diff --git a/gems/dry-validation/1.9/messages/index.html b/gems/dry-validation/1.9/messages/index.html index c7feb38f94..aced0aba3b 100644 --- a/gems/dry-validation/1.9/messages/index.html +++ b/gems/dry-validation/1.9/messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Messages

Messages in failure API can be set in 3 different ways:

+});

Messages

Messages in failure API can be set in 3 different ways:

  • By passing a message string explicitly - the simplest way; however, using locales is a cleaner solution even if you don't have a multi-language system
  • diff --git a/gems/dry-validation/1.9/messages/index.html.gz b/gems/dry-validation/1.9/messages/index.html.gz index c90a81fc57..f176b9cc17 100644 Binary files a/gems/dry-validation/1.9/messages/index.html.gz and b/gems/dry-validation/1.9/messages/index.html.gz differ diff --git a/gems/dry-validation/1.9/pattern-matching/index.html b/gems/dry-validation/1.9/pattern-matching/index.html index 489d8c7e06..d48216ae67 100644 --- a/gems/dry-validation/1.9/pattern-matching/index.html +++ b/gems/dry-validation/1.9/pattern-matching/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Pattern matching

Ruby 2.7 added experimental support for pattern matching. dry-validation supports pattern matching on result values starting with 1.4.1.

+});

Pattern matching

Ruby 2.7 added experimental support for pattern matching. dry-validation supports pattern matching on result values starting with 1.4.1.

class PersonContract < Dry::Validation::Contract
   params do
     required(:first_name).filled(:string)
diff --git a/gems/dry-validation/1.9/pattern-matching/index.html.gz b/gems/dry-validation/1.9/pattern-matching/index.html.gz
index b480f6e26d..0e77c12723 100644
Binary files a/gems/dry-validation/1.9/pattern-matching/index.html.gz and b/gems/dry-validation/1.9/pattern-matching/index.html.gz differ
diff --git a/gems/dry-validation/1.9/rules/index.html b/gems/dry-validation/1.9/rules/index.html
index c20856c68e..416c3a9a23 100644
--- a/gems/dry-validation/1.9/rules/index.html
+++ b/gems/dry-validation/1.9/rules/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

+});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

When you apply a contract, it will process the input data using its schema, and then apply its rules one-by-one, in the same order as you defined them.

diff --git a/gems/dry-validation/1.9/rules/index.html.gz b/gems/dry-validation/1.9/rules/index.html.gz index f65b391812..0a28a49188 100644 Binary files a/gems/dry-validation/1.9/rules/index.html.gz and b/gems/dry-validation/1.9/rules/index.html.gz differ diff --git a/gems/dry-validation/1.9/schemas/index.html b/gems/dry-validation/1.9/schemas/index.html index c1a2ef6c18..c226c97c89 100644 --- a/gems/dry-validation/1.9/schemas/index.html +++ b/gems/dry-validation/1.9/schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Schemas

Schemas are a crucial part of dry-validation, they pre-process the data before it's validated by the rules and can provide detailed error messages. By default, the exposed DSL for defining schemas uses dry-schema under the hood.

+});

Configuration

Contract classes can be configured using their config object. You'll usually want to define an abstract contract class that all your other classes will inherit from. This way you can share common configuration between many contracts with no duplication.

+});

Extensions

Monads

diff --git a/gems/dry-validation/main/extensions/index.html.gz b/gems/dry-validation/main/extensions/index.html.gz index 6d9f8e4d1e..73236e1b76 100644 Binary files a/gems/dry-validation/main/extensions/index.html.gz and b/gems/dry-validation/main/extensions/index.html.gz differ diff --git a/gems/dry-validation/main/external-dependencies/index.html b/gems/dry-validation/main/external-dependencies/index.html index 206a2171ae..1156470b1c 100644 --- a/gems/dry-validation/main/external-dependencies/index.html +++ b/gems/dry-validation/main/external-dependencies/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

+});

External dependencies

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage Dry::Validation::Contract.option.

The option method is provided by dry-initializer.

diff --git a/gems/dry-validation/main/external-dependencies/index.html.gz b/gems/dry-validation/main/external-dependencies/index.html.gz index 7a08c2afcb..b2f24f34dd 100644 Binary files a/gems/dry-validation/main/external-dependencies/index.html.gz and b/gems/dry-validation/main/external-dependencies/index.html.gz differ diff --git a/gems/dry-validation/main/index.html b/gems/dry-validation/main/index.html index 629a55cf26..187e0d52ec 100644 --- a/gems/dry-validation/main/index.html +++ b/gems/dry-validation/main/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Introduction

dry-validation is a data validation library that provides a powerful DSL for defining schemas and validation rules.

+});

Macros

This is an experimental feature and its API may change before 2.0.0

diff --git a/gems/dry-validation/main/macros/index.html.gz b/gems/dry-validation/main/macros/index.html.gz index 95daf88de7..cb23c64891 100644 Binary files a/gems/dry-validation/main/macros/index.html.gz and b/gems/dry-validation/main/macros/index.html.gz differ diff --git a/gems/dry-validation/main/messages/index.html b/gems/dry-validation/main/messages/index.html index c85789930a..673c0ee22e 100644 --- a/gems/dry-validation/main/messages/index.html +++ b/gems/dry-validation/main/messages/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Messages

Messages in failure API can be set in 3 different ways:

+});

Messages

Messages in failure API can be set in 3 different ways:

  • By passing a message string explicitly - the simplest way; however, using locales is a cleaner solution even if you don't have a multi-language system
  • diff --git a/gems/dry-validation/main/messages/index.html.gz b/gems/dry-validation/main/messages/index.html.gz index 1cb3e958d4..14e7138cce 100644 Binary files a/gems/dry-validation/main/messages/index.html.gz and b/gems/dry-validation/main/messages/index.html.gz differ diff --git a/gems/dry-validation/main/pattern-matching/index.html b/gems/dry-validation/main/pattern-matching/index.html index c6ab7ee5e0..4072d7e72d 100644 --- a/gems/dry-validation/main/pattern-matching/index.html +++ b/gems/dry-validation/main/pattern-matching/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Pattern matching

Ruby 2.7 added experimental support for pattern matching. dry-validation supports pattern matching on result values starting with 1.4.1.

+});

Pattern matching

Ruby 2.7 added experimental support for pattern matching. dry-validation supports pattern matching on result values starting with 1.4.1.

class PersonContract < Dry::Validation::Contract
   params do
     required(:first_name).filled(:string)
diff --git a/gems/dry-validation/main/pattern-matching/index.html.gz b/gems/dry-validation/main/pattern-matching/index.html.gz
index 9badfec6b1..fa8b6de129 100644
Binary files a/gems/dry-validation/main/pattern-matching/index.html.gz and b/gems/dry-validation/main/pattern-matching/index.html.gz differ
diff --git a/gems/dry-validation/main/rules/index.html b/gems/dry-validation/main/rules/index.html
index c3e8170801..edfe8714a8 100644
--- a/gems/dry-validation/main/rules/index.html
+++ b/gems/dry-validation/main/rules/index.html
@@ -3,7 +3,7 @@
   indexName: 'dry-rb',
   inputSelector: '#search-input',
   debug: false // Set debug to true if you want to inspect the dropdown
-});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

+});

Rules

Rules in contracts are meant to perform domain-specific validation of the data already processed by the contract's schema. This way, you can define rules that can focus purely on their validation logic without having to worry about type-related details.

When you apply a contract, it will process the input data using its schema, and then apply its rules one-by-one, in the same order as you defined them.

diff --git a/gems/dry-validation/main/rules/index.html.gz b/gems/dry-validation/main/rules/index.html.gz index 48bb86eadd..97af5f13fe 100644 Binary files a/gems/dry-validation/main/rules/index.html.gz and b/gems/dry-validation/main/rules/index.html.gz differ diff --git a/gems/dry-validation/main/schemas/index.html b/gems/dry-validation/main/schemas/index.html index 7c28e7ec9b..aef15a8cb0 100644 --- a/gems/dry-validation/main/schemas/index.html +++ b/gems/dry-validation/main/schemas/index.html @@ -3,7 +3,7 @@ indexName: 'dry-rb', inputSelector: '#search-input', debug: false // Set debug to true if you want to inspect the dropdown -});

Schemas

Schemas are a crucial part of dry-validation, they pre-process the data before it's validated by the rules and can provide detailed error messages. By default, the exposed DSL for defining schemas uses dry-schema under the hood.

+});

Schemas

Schemas are a crucial part of dry-validation, they pre-process the data before it's validated by the rules and can provide detailed error messages. By default, the exposed DSL for defining schemas uses dry-schema under the hood.

diff --git a/gems/dry-validation/main/schemas/index.html.gz b/gems/dry-validation/main/schemas/index.html.gz index c2fa2028f0..9a6bd846b2 100644 Binary files a/gems/dry-validation/main/schemas/index.html.gz and b/gems/dry-validation/main/schemas/index.html.gz differ diff --git a/gems/dry-view/0.7/configuration/index.html.gz b/gems/dry-view/0.7/configuration/index.html.gz index afaeb7670a..1c9c76823a 100644 Binary files a/gems/dry-view/0.7/configuration/index.html.gz and b/gems/dry-view/0.7/configuration/index.html.gz differ diff --git a/gems/dry-view/0.7/context/index.html.gz b/gems/dry-view/0.7/context/index.html.gz index 2673aab5c7..d81314a392 100644 Binary files a/gems/dry-view/0.7/context/index.html.gz and b/gems/dry-view/0.7/context/index.html.gz differ diff --git a/gems/dry-view/0.7/exposures/index.html.gz b/gems/dry-view/0.7/exposures/index.html.gz index ad915dc403..63a8a8277a 100644 Binary files a/gems/dry-view/0.7/exposures/index.html.gz and b/gems/dry-view/0.7/exposures/index.html.gz differ diff --git a/gems/dry-view/0.7/index.html.gz b/gems/dry-view/0.7/index.html.gz index 6fe5cc68bd..97e4cc3896 100644 Binary files a/gems/dry-view/0.7/index.html.gz and b/gems/dry-view/0.7/index.html.gz differ diff --git a/gems/dry-view/0.7/injecting-dependencies/index.html.gz b/gems/dry-view/0.7/injecting-dependencies/index.html.gz index 52c716d4b7..2e83266d0b 100644 Binary files a/gems/dry-view/0.7/injecting-dependencies/index.html.gz and b/gems/dry-view/0.7/injecting-dependencies/index.html.gz differ diff --git a/gems/dry-view/0.7/parts/index.html.gz b/gems/dry-view/0.7/parts/index.html.gz index b0dd0cf31b..3edcc93b29 100644 Binary files a/gems/dry-view/0.7/parts/index.html.gz and b/gems/dry-view/0.7/parts/index.html.gz differ diff --git a/gems/dry-view/0.7/scopes/index.html.gz b/gems/dry-view/0.7/scopes/index.html.gz index 58d96ac2cb..23f16019e3 100644 Binary files a/gems/dry-view/0.7/scopes/index.html.gz and b/gems/dry-view/0.7/scopes/index.html.gz differ diff --git a/gems/dry-view/0.7/templates/index.html.gz b/gems/dry-view/0.7/templates/index.html.gz index d598ae0747..9b57438f19 100644 Binary files a/gems/dry-view/0.7/templates/index.html.gz and b/gems/dry-view/0.7/templates/index.html.gz differ diff --git a/gems/dry-view/0.7/testing/index.html.gz b/gems/dry-view/0.7/testing/index.html.gz index 9bc97062e1..297560bb0e 100644 Binary files a/gems/dry-view/0.7/testing/index.html.gz and b/gems/dry-view/0.7/testing/index.html.gz differ diff --git a/gems/dry-view/index.html.gz b/gems/dry-view/index.html.gz index 9dec52a74f..98debaab56 100644 Binary files a/gems/dry-view/index.html.gz and b/gems/dry-view/index.html.gz differ diff --git a/gems/dry-view/main/configuration/index.html.gz b/gems/dry-view/main/configuration/index.html.gz index 407c6d9086..27aded6b3b 100644 Binary files a/gems/dry-view/main/configuration/index.html.gz and b/gems/dry-view/main/configuration/index.html.gz differ diff --git a/gems/dry-view/main/context/index.html.gz b/gems/dry-view/main/context/index.html.gz index bfa8dd3032..3eb904a03a 100644 Binary files a/gems/dry-view/main/context/index.html.gz and b/gems/dry-view/main/context/index.html.gz differ diff --git a/gems/dry-view/main/exposures/index.html.gz b/gems/dry-view/main/exposures/index.html.gz index 10cc7bb9ea..2a45386d48 100644 Binary files a/gems/dry-view/main/exposures/index.html.gz and b/gems/dry-view/main/exposures/index.html.gz differ diff --git a/gems/dry-view/main/index.html.gz b/gems/dry-view/main/index.html.gz index ef783ace1e..b856ebc1f7 100644 Binary files a/gems/dry-view/main/index.html.gz and b/gems/dry-view/main/index.html.gz differ diff --git a/gems/dry-view/main/injecting-dependencies/index.html.gz b/gems/dry-view/main/injecting-dependencies/index.html.gz index 4a623153dd..a80eef4d25 100644 Binary files a/gems/dry-view/main/injecting-dependencies/index.html.gz and b/gems/dry-view/main/injecting-dependencies/index.html.gz differ diff --git a/gems/dry-view/main/parts/index.html.gz b/gems/dry-view/main/parts/index.html.gz index 0bc836925a..3426f9c845 100644 Binary files a/gems/dry-view/main/parts/index.html.gz and b/gems/dry-view/main/parts/index.html.gz differ diff --git a/gems/dry-view/main/scopes/index.html.gz b/gems/dry-view/main/scopes/index.html.gz index 09472ae4ff..2ad21b3755 100644 Binary files a/gems/dry-view/main/scopes/index.html.gz and b/gems/dry-view/main/scopes/index.html.gz differ diff --git a/gems/dry-view/main/templates/index.html.gz b/gems/dry-view/main/templates/index.html.gz index 399a1910b7..d52ebcbe4f 100644 Binary files a/gems/dry-view/main/templates/index.html.gz and b/gems/dry-view/main/templates/index.html.gz differ diff --git a/gems/dry-view/main/testing/index.html.gz b/gems/dry-view/main/testing/index.html.gz index d0a83e1660..c25bb9e42f 100644 Binary files a/gems/dry-view/main/testing/index.html.gz and b/gems/dry-view/main/testing/index.html.gz differ diff --git a/gems/index.html.gz b/gems/index.html.gz index f707a1be10..384f854b02 100644 Binary files a/gems/index.html.gz and b/gems/index.html.gz differ diff --git a/images/search-1d2ffb92.svg.gz b/images/search-1d2ffb92.svg.gz index b5cc143b14..94c232fc14 100644 Binary files a/images/search-1d2ffb92.svg.gz and b/images/search-1d2ffb92.svg.gz differ diff --git a/index.html.gz b/index.html.gz index b4aee8c121..afb6c8b03a 100644 Binary files a/index.html.gz and b/index.html.gz differ diff --git a/news/2016/03/16/announcing-dry-rb/index.html.gz b/news/2016/03/16/announcing-dry-rb/index.html.gz index 09a0239f49..6ef5efcb4b 100644 Binary files a/news/2016/03/16/announcing-dry-rb/index.html.gz and b/news/2016/03/16/announcing-dry-rb/index.html.gz differ diff --git a/news/2016/03/31/new-releases-of-dry-types-and-dry-validation/index.html.gz b/news/2016/03/31/new-releases-of-dry-types-and-dry-validation/index.html.gz index c57ce7ccc8..3d498934c9 100644 Binary files a/news/2016/03/31/new-releases-of-dry-types-and-dry-validation/index.html.gz and b/news/2016/03/31/new-releases-of-dry-types-and-dry-validation/index.html.gz differ diff --git a/news/2016/04/07/dry-transaction-0-6-brings-powerful-new-support-for-custom-step-adapters/index.html.gz b/news/2016/04/07/dry-transaction-0-6-brings-powerful-new-support-for-custom-step-adapters/index.html.gz index a7939396fa..1834150560 100644 Binary files a/news/2016/04/07/dry-transaction-0-6-brings-powerful-new-support-for-custom-step-adapters/index.html.gz and b/news/2016/04/07/dry-transaction-0-6-brings-powerful-new-support-for-custom-step-adapters/index.html.gz differ diff --git a/news/2016/07/01/dry-validation-0-8-0-released/index.html.gz b/news/2016/07/01/dry-validation-0-8-0-released/index.html.gz index 9cc65a51b7..b10c695322 100644 Binary files a/news/2016/07/01/dry-validation-0-8-0-released/index.html.gz and b/news/2016/07/01/dry-validation-0-8-0-released/index.html.gz differ diff --git a/news/2016/08/15/introducing-dry-system/index.html.gz b/news/2016/08/15/introducing-dry-system/index.html.gz index d5869b9b35..3682b380b7 100644 Binary files a/news/2016/08/15/introducing-dry-system/index.html.gz and b/news/2016/08/15/introducing-dry-system/index.html.gz differ diff --git a/news/2016/09/23/new-gem-releases/index.html.gz b/news/2016/09/23/new-gem-releases/index.html.gz index b0f2e03eb0..13b0eedfcb 100644 Binary files a/news/2016/09/23/new-gem-releases/index.html.gz and b/news/2016/09/23/new-gem-releases/index.html.gz differ diff --git a/news/2017/01/30/announcing-dry-view-a-functional-view-rendering-system-for-ruby/index.html.gz b/news/2017/01/30/announcing-dry-view-a-functional-view-rendering-system-for-ruby/index.html.gz index 3dc05ca546..aab1c276a4 100644 Binary files a/news/2017/01/30/announcing-dry-view-a-functional-view-rendering-system-for-ruby/index.html.gz and b/news/2017/01/30/announcing-dry-view-a-functional-view-rendering-system-for-ruby/index.html.gz differ diff --git a/news/2017/05/15/dry-view-0-3-0-another-step-towards-solving-the-view-layer-mess/index.html.gz b/news/2017/05/15/dry-view-0-3-0-another-step-towards-solving-the-view-layer-mess/index.html.gz index 0ae4f8b90c..2a145f80ab 100644 Binary files a/news/2017/05/15/dry-view-0-3-0-another-step-towards-solving-the-view-layer-mess/index.html.gz and b/news/2017/05/15/dry-view-0-3-0-another-step-towards-solving-the-view-layer-mess/index.html.gz differ diff --git a/news/2017/06/15/dry-transaction-0-10-0-brings-class-based-transactions-and-a-whole-new-level-of-flexibility/index.html.gz b/news/2017/06/15/dry-transaction-0-10-0-brings-class-based-transactions-and-a-whole-new-level-of-flexibility/index.html.gz index c4d9f71fa1..0ee992824a 100644 Binary files a/news/2017/06/15/dry-transaction-0-10-0-brings-class-based-transactions-and-a-whole-new-level-of-flexibility/index.html.gz and b/news/2017/06/15/dry-transaction-0-10-0-brings-class-based-transactions-and-a-whole-new-level-of-flexibility/index.html.gz differ diff --git a/news/2018/01/05/dry-system-0-9-released-with-new-plugins/index.html.gz b/news/2018/01/05/dry-system-0-9-released-with-new-plugins/index.html.gz index ff0facdadf..97a4a43465 100644 Binary files a/news/2018/01/05/dry-system-0-9-released-with-new-plugins/index.html.gz and b/news/2018/01/05/dry-system-0-9-released-with-new-plugins/index.html.gz differ diff --git a/news/2018/06/26/dry-monads-1-0-released/index.html.gz b/news/2018/06/26/dry-monads-1-0-released/index.html.gz index 8d771b6284..21258314cc 100644 Binary files a/news/2018/06/26/dry-monads-1-0-released/index.html.gz and b/news/2018/06/26/dry-monads-1-0-released/index.html.gz differ diff --git a/news/2019/02/12/dry-view-0-6-0-an-introductory-talk-and-plans-for-1-0/index.html.gz b/news/2019/02/12/dry-view-0-6-0-an-introductory-talk-and-plans-for-1-0/index.html.gz index 4b72f1699f..80d6873171 100644 Binary files a/news/2019/02/12/dry-view-0-6-0-an-introductory-talk-and-plans-for-1-0/index.html.gz and b/news/2019/02/12/dry-view-0-6-0-an-introductory-talk-and-plans-for-1-0/index.html.gz differ diff --git a/news/2019/04/23/dry-types-and-dry-struct-1-0-0-released/index.html.gz b/news/2019/04/23/dry-types-and-dry-struct-1-0-0-released/index.html.gz index cf8afd01eb..8c89265a87 100644 Binary files a/news/2019/04/23/dry-types-and-dry-struct-1-0-0-released/index.html.gz and b/news/2019/04/23/dry-types-and-dry-struct-1-0-0-released/index.html.gz differ diff --git a/news/2019/06/10/dry-validation-1-0-0-released/index.html.gz b/news/2019/06/10/dry-validation-1-0-0-released/index.html.gz index 0a9ba5cec3..b862c6882d 100644 Binary files a/news/2019/06/10/dry-validation-1-0-0-released/index.html.gz and b/news/2019/06/10/dry-validation-1-0-0-released/index.html.gz differ diff --git a/news/2019/10/03/introducing-dry-effects/index.html.gz b/news/2019/10/03/introducing-dry-effects/index.html.gz index 863f5cd76d..d8601df66e 100644 Binary files a/news/2019/10/03/introducing-dry-effects/index.html.gz and b/news/2019/10/03/introducing-dry-effects/index.html.gz differ diff --git a/news/2020/03/11/dry-schema-and-dry-validation-1-5-0-released/index.html.gz b/news/2020/03/11/dry-schema-and-dry-validation-1-5-0-released/index.html.gz index a5a84eaa43..eec4020674 100644 Binary files a/news/2020/03/11/dry-schema-and-dry-validation-1-5-0-released/index.html.gz and b/news/2020/03/11/dry-schema-and-dry-validation-1-5-0-released/index.html.gz differ diff --git a/news/2021/04/22/dry-system-0-19-released-with-zeitwerk-support-and-more-leading-the-way-for-hanami-2-0/index.html.gz b/news/2021/04/22/dry-system-0-19-released-with-zeitwerk-support-and-more-leading-the-way-for-hanami-2-0/index.html.gz index ca04e2d9a0..543907eeda 100644 Binary files a/news/2021/04/22/dry-system-0-19-released-with-zeitwerk-support-and-more-leading-the-way-for-hanami-2-0/index.html.gz and b/news/2021/04/22/dry-system-0-19-released-with-zeitwerk-support-and-more-leading-the-way-for-hanami-2-0/index.html.gz differ diff --git a/news/2021/05/04/introducing-dry-files/index.html.gz b/news/2021/05/04/introducing-dry-files/index.html.gz index bac2ff618c..d7aeaa1690 100644 Binary files a/news/2021/05/04/introducing-dry-files/index.html.gz and b/news/2021/05/04/introducing-dry-files/index.html.gz differ diff --git a/news/2022/10/17/dry-rb-adopts-zeitwerk-for-code-loading/index.html.gz b/news/2022/10/17/dry-rb-adopts-zeitwerk-for-code-loading/index.html.gz index a8baa94410..5bc757b9bf 100644 Binary files a/news/2022/10/17/dry-rb-adopts-zeitwerk-for-code-loading/index.html.gz and b/news/2022/10/17/dry-rb-adopts-zeitwerk-for-code-loading/index.html.gz differ diff --git a/news/index.html.gz b/news/index.html.gz index 75c808140f..fbb94db472 100644 Binary files a/news/index.html.gz and b/news/index.html.gz differ diff --git a/resources/reddotrubyconf-2016/index.html.gz b/resources/reddotrubyconf-2016/index.html.gz index 76389b3b9e..b45539d99d 100644 Binary files a/resources/reddotrubyconf-2016/index.html.gz and b/resources/reddotrubyconf-2016/index.html.gz differ diff --git a/resources/rubyconfmy-2017/index.html.gz b/resources/rubyconfmy-2017/index.html.gz index 62f6c19374..91f8ddf98c 100644 Binary files a/resources/rubyconfmy-2017/index.html.gz and b/resources/rubyconfmy-2017/index.html.gz differ diff --git a/resources/southeastruby-2017/index.html.gz b/resources/southeastruby-2017/index.html.gz index 0658d5fbdf..b3abd090a4 100644 Binary files a/resources/southeastruby-2017/index.html.gz and b/resources/southeastruby-2017/index.html.gz differ diff --git a/status/index.html.gz b/status/index.html.gz index dc96751f50..fe18eb6b61 100644 Binary files a/status/index.html.gz and b/status/index.html.gz differ