Class: Dry::Logic::Rule::Attr

Inherits:
Key show all
Defined in:
lib/dry/logic/rule/attr.rb

Instance Attribute Summary

Attributes inherited from Key

#evaluator, #name

Attributes inherited from Dry::Logic::Rule

#options, #predicate

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Key

#evaluate, #initialize, new, #to_ast

Methods inherited from Value

#apply, #call, #evaluate, #to_ast

Methods inherited from Dry::Logic::Rule

#and, #curry, #each?, #initialize, #negation, #new, #or, #predicate_id, #then, #xor

Constructor Details

This class inherits a constructor from Dry::Logic::Rule::Key

Class Method Details

.evaluator(options) ⇒ Object



4
5
6
# File 'lib/dry/logic/rule/attr.rb', line 4

def self.evaluator(options)
  Evaluator::Attr.new(options.fetch(:name))
end

Instance Method Details

#typeObject



8
9
10
# File 'lib/dry/logic/rule/attr.rb', line 8

def type
  :attr
end