Class: Dry::Validation::Rust::Schema::Predicate Private

Inherits:
Data
  • Object
show all
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

Instance Method Summary collapse

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

#argumentObject (readonly)

Returns the value of attribute argument

Returns:

  • (Object)

    the current value of argument



29
30
31
# File 'lib/dry/validation/rust/schema.rb', line 29

def argument
  @argument
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



29
30
31
# File 'lib/dry/validation/rust/schema.rb', line 29

def name
  @name
end