Class: Dry::Validation::Rust::Schema::Predicate Private
- Inherits:
-
Data
- Object
- Data
- Dry::Validation::Rust::Schema::Predicate
- Defined in:
- lib/dry/validation/rust/schema.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
-
#argument ⇒ Object
readonly
Returns the value of attribute argument.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:, argument: true) ⇒ Predicate
constructor
private
A new instance of Predicate.
Constructor Details
#initialize(name:, argument: true) ⇒ Predicate
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 Predicate.
30 31 32 |
# File 'lib/dry/validation/rust/schema.rb', line 30 def initialize(name:, argument: true) super(name: name.to_s.delete_suffix('?').to_sym, argument: argument) end |
Instance Attribute Details
#argument ⇒ Object (readonly)
Returns the value of attribute argument
29 30 31 |
# File 'lib/dry/validation/rust/schema.rb', line 29 def argument @argument end |
#name ⇒ Object (readonly)
Returns the value of attribute name
29 30 31 |
# File 'lib/dry/validation/rust/schema.rb', line 29 def name @name end |