Class: Dry::Mutations::DSL::Types::Nested

Inherits:
Object
  • Object
show all
Extended by:
Module
Defined in:
lib/dry/mutations/dsl/types.rb

Overview

:nodoc:

Class Method Summary collapse

Methods included from Module

extended, included

Class Method Details

.!(current, &cb) ⇒ Object



12
13
14
# File 'lib/dry/mutations/dsl/types.rb', line 12

def self.! current, &cb
  Class.new(Nested).init current, &cb
end

.init(current) ⇒ Object



6
7
8
9
10
# File 'lib/dry/mutations/dsl/types.rb', line 6

def self.init current
  @current = current
  instance_eval(&Proc.new) if block_given?
  schema
end