lib/dry/schema/macros/core.rb in dry-schema-1.4.3 vs lib/dry/schema/macros/core.rb in dry-schema-1.5.0

- old
+ new

@@ -1,12 +1,12 @@ # frozen_string_literal: true -require 'dry/initializer' +require "dry/initializer" -require 'dry/schema/constants' -require 'dry/schema/compiler' -require 'dry/schema/trace' +require "dry/schema/constants" +require "dry/schema/compiler" +require "dry/schema/trace" module Dry module Schema module Macros # Abstract macro class @@ -28,9 +28,14 @@ option :schema_dsl, optional: true # @api private def new(**options) self.class.new(name: name, compiler: compiler, schema_dsl: schema_dsl, **options) + end + + # @api private + def path + schema_dsl.path end # @api private def to_rule compiler.visit(to_ast)