class Dry::Logic::Operations::Abstract

Attributes

options[R]
rules[R]

Public Class Methods

new(*rules, **options) click to toggle source
# File lib/dry/logic/operations/abstract.rb, line 15
def initialize(*rules, **options)
  @rules = rules
  @options = options
end

Public Instance Methods

curry(*args) click to toggle source
# File lib/dry/logic/operations/abstract.rb, line 24
def curry(*args)
  new(rules.map { |rule| rule.curry(*args) }, **options)
end
id() click to toggle source
# File lib/dry/logic/operations/abstract.rb, line 20
def id
  options[:id]
end
new(rules, **new_options) click to toggle source
# File lib/dry/logic/operations/abstract.rb, line 28
def new(rules, **new_options)
  self.class.new(*rules, **options, **new_options)
end
to_ast() click to toggle source
# File lib/dry/logic/operations/abstract.rb, line 36
def to_ast
  ast
end
with(new_options) click to toggle source
# File lib/dry/logic/operations/abstract.rb, line 32
def with(new_options)
  new(rules, **options, **new_options)
end