Sha256: 8ace8323a3c680b9dd5e64306cc682d88420839a39cd87f5249dd19d1f092aca

Contents?: true

Size: 528 Bytes

Versions: 32

Compression:

Stored size: 528 Bytes

Contents

# frozen_string_literal: true

require "dry/schema/extensions/info/schema_compiler"

module Dry
  module Schema
    # Info extension
    #
    # @api public
    module Info
      module SchemaMethods
        # Return information about keys and types
        #
        # @return [Hash<Symbol=>Hash>]
        #
        # @api public
        def info
          compiler = SchemaCompiler.new
          compiler.call(to_ast)
          compiler.to_h
        end
      end
    end

    Processor.include(Info::SchemaMethods)
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
dry-schema-1.13.3 lib/dry/schema/extensions/info.rb
dry-schema-1.13.2 lib/dry/schema/extensions/info.rb
dry-schema-1.13.1 lib/dry/schema/extensions/info.rb
dry-schema-1.13.0 lib/dry/schema/extensions/info.rb
dry-schema-1.12.0 lib/dry/schema/extensions/info.rb
dry-schema-1.11.3 lib/dry/schema/extensions/info.rb
dry-schema-1.11.2 lib/dry/schema/extensions/info.rb
dry-schema-1.11.1 lib/dry/schema/extensions/info.rb
dry-schema-1.11.0 lib/dry/schema/extensions/info.rb
dry-schema-1.10.6 lib/dry/schema/extensions/info.rb
dry-schema-1.10.5 lib/dry/schema/extensions/info.rb
dry-schema-1.10.4 lib/dry/schema/extensions/info.rb
dry-schema-1.10.3 lib/dry/schema/extensions/info.rb
dry-schema-1.10.2 lib/dry/schema/extensions/info.rb
dry-schema-1.10.1 lib/dry/schema/extensions/info.rb
dry-schema-1.9.3 lib/dry/schema/extensions/info.rb
dry-schema-1.9.2 lib/dry/schema/extensions/info.rb
dry-schema-1.9.1 lib/dry/schema/extensions/info.rb
dry-schema-1.9.0 lib/dry/schema/extensions/info.rb
dry-schema-1.8.0 lib/dry/schema/extensions/info.rb