Class: Typed::Builder::ConstrainedType
- Inherits:
-
Object
- Object
- Typed::Builder::ConstrainedType
- Includes:
- BaseType
- Defined in:
- lib/typed/builder.rb
Instance Method Summary collapse
-
#initialize(base_type, &constraint) ⇒ ConstrainedType
constructor
A new instance of ConstrainedType.
- #process(value) ⇒ Object
Methods included from BaseType
#call, #constrained, #constructor, #default, #enum, #instance, #missable, #nullable, #|
Constructor Details
#initialize(base_type, &constraint) ⇒ ConstrainedType
Returns a new instance of ConstrainedType.
145 146 147 148 |
# File 'lib/typed/builder.rb', line 145 def initialize(base_type, &constraint) @base_type = base_type @constraint = constraint end |