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) ⇒ 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.



28
29
30
# File 'lib/dry/schema/macros/core.rb', line 28

def new(**options)
  self.class.new(name: name, compiler: compiler, schema_dsl: schema_dsl, **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)


49
50
51
# File 'lib/dry/schema/macros/core.rb', line 49

def operation
  raise NotImplementedError
end

#pathObject

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.



33
34
35
# File 'lib/dry/schema/macros/core.rb', line 33

def path
  schema_dsl.path
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.



43
44
45
# File 'lib/dry/schema/macros/core.rb', line 43

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.



38
39
40
# File 'lib/dry/schema/macros/core.rb', line 38

def to_rule
  compiler.visit(to_ast)
end