Class: Dry::Schema::Macros::Core Private

Inherits:
Object
  • Object
show all
Extended by:
Initializer
Defined in:
lib/dry/schema/macros/core.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Abstract macro class

Direct Known Subclasses

DSL

Instance Method Summary collapse

Instance Method Details

#new(options = EMPTY_HASH) ⇒ Object

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.



31
32
33
# File 'lib/dry/schema/macros/core.rb', line 31

def new(options = EMPTY_HASH)
  self.class.new({ name: name, compiler: compiler, schema_dsl: schema_dsl }.merge(options))
end

#operationObject

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.

Raises:

  • (NotImplementedError)


47
48
49
# File 'lib/dry/schema/macros/core.rb', line 47

def operation
  raise NotImplementedError
end

#to_astObject Also known as: ast

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.



41
42
43
# File 'lib/dry/schema/macros/core.rb', line 41

def to_ast(*)
  trace.to_ast
end

#to_ruleObject

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.



36
37
38
# File 'lib/dry/schema/macros/core.rb', line 36

def to_rule
  compiler.visit(to_ast)
end