Class: Drymm::Shapes::Fn::FnNode Abstract

Inherits:
Node
  • Object
show all
Extended by:
Summarize
Defined in:
lib/drymm/shapes/fn.rb

Overview

This class is abstract.

Abstract node branch class for shapes of Dry::Types::Constructor::Function

Direct Known Subclasses

Callable, ID, Method

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Node

type_enum, type_identifier

Methods included from ASTMethods

#to_ast

Methods included from JSONMethods

#to_json

Class Method Details

.compiler(registry = compiler_registry()) ⇒ ::Dry::Logic::RuleCompiler

Returns:

  • (::Dry::Logic::RuleCompiler)


27
28
29
# File 'lib/drymm/shapes/fn.rb', line 27

def self.compiler(registry = compiler_registry())
  ::Dry::Types::Compiler.new(registry)
end

.compiler_registry::Dry::Logic::Predicates

Returns:

  • (::Dry::Logic::Predicates)


22
23
24
# File 'lib/drymm/shapes/fn.rb', line 22

def self.compiler_registry
  ::Dry::Types.container
end

.namespaceObject



17
18
19
# File 'lib/drymm/shapes/fn.rb', line 17

def self.namespace
  Fn
end

Instance Method Details

#compileObject



31
32
33
# File 'lib/drymm/shapes/fn.rb', line 31

def compile
  self.class.compiler.compile_fn(to_ast)
end