Class: Dry::Schema::Path

Inherits:
Object
  • Object
show all
Defined in:
lib/dry/validation/schema_ext.rb

Instance Method Summary collapse

Instance Method Details

#expandObject

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.



15
16
17
# File 'lib/dry/validation/schema_ext.rb', line 15

def expand
  to_a[0..-2].product(last).map { |spec| self.class[spec] }
end

#multi_value?Boolean

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:

  • (Boolean)


10
11
12
# File 'lib/dry/validation/schema_ext.rb', line 10

def multi_value?
  last.is_a?(Array)
end