class Dry::Schema::Path
def self.call(spec)
- Api: - private
Returns:
-
(Path)
-
Parameters:
-
spec
(Path, Symbol, String, Hash, Array
) --
def self.call(spec) case spec when Symbol, Array new(Array[*spec]) when String new(spec.split(DOT).map(&:to_sym)) when Hash new(keys_from_hash(spec)) when self spec else raise ArgumentError, "+spec+ must be either a Symbol, Array, Hash or a #{name}" end end