Class: Dry::Validation::Rust::Contract::OptionDefinition Private
- Inherits:
-
Data
- Object
- Data
- Dry::Validation::Rust::Contract::OptionDefinition
- Defined in:
- lib/dry/validation/rust/contract.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#optional ⇒ Object
readonly
Returns the value of attribute optional.
Instance Method Summary collapse
-
#initialize(name:, default: Contract::Undefined, optional: false) ⇒ OptionDefinition
constructor
private
A new instance of OptionDefinition.
Constructor Details
#initialize(name:, default: Contract::Undefined, optional: false) ⇒ OptionDefinition
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of OptionDefinition.
22 23 24 |
# File 'lib/dry/validation/rust/contract.rb', line 22 def initialize(name:, default: Contract::Undefined, optional: false) super end |
Instance Attribute Details
#default ⇒ Object (readonly)
Returns the value of attribute default
21 22 23 |
# File 'lib/dry/validation/rust/contract.rb', line 21 def default @default end |
#name ⇒ Object (readonly)
Returns the value of attribute name
21 22 23 |
# File 'lib/dry/validation/rust/contract.rb', line 21 def name @name end |
#optional ⇒ Object (readonly)
Returns the value of attribute optional
21 22 23 |
# File 'lib/dry/validation/rust/contract.rb', line 21 def optional @optional end |