Cuprum

An opinionated implementation of the Command pattern for Ruby applications. Cuprum wraps your business logic in a consistent, object-oriented interface and features status and error management, composability and control flow management.

Class: Cuprum::ParameterValidation::ValidationRule

Parent Namespace
Cuprum::ParameterValidation
Inherited Classes
Struct > Object
Defined In
lib/cuprum/parameter_validation/validation_rule.rb

Table Of Contents

Overview

Value class representing a single validation for a parameter.

Back To Top

Constants

BLOCK_VALIDATION_TYPE

= :_block_validation

Custom validation type for a block validation.

NAMED_VALIDATION_TYPE

= :_named_method_validation

Custom validation type for a named method validation.

Back To Top

Constructor

#initialize(name:, type:, method_name: nil, **options, &block) => ValidationRule

Parameters

Returns

Back To Top

Instance Attributes

#block => Object

Returns the value of attribute block

Returns

#method_name => Object

Returns the value of attribute method_name

Returns

#name => Object

Returns the value of attribute name

Returns

#options => Object

Returns the value of attribute options

Returns

#type => Object

Returns the value of attribute type

Returns

Back To Top

Instance Methods

Back To Top


Back to Documentation | Reference | Cuprum | Cuprum::ParameterValidation