class Dry::Logic::Rule::Predicate

Public Class Methods

specialize(arity, curried, base = Predicate) click to toggle source
Calls superclass method Dry::Logic::Rule::specialize
# File lib/dry/logic/rule/predicate.rb, line 8
def self.specialize(arity, curried, base = Predicate)
  super
end

Public Instance Methods

ast(input = Undefined) click to toggle source
# File lib/dry/logic/rule/predicate.rb, line 28
def ast(input = Undefined)
  [type, [name, args_with_names(input)]]
end
Also aliased as: to_ast
name() click to toggle source
# File lib/dry/logic/rule/predicate.rb, line 16
def name
  predicate.name
end
to_ast(input = Undefined)
Alias for: ast
to_s() click to toggle source
# File lib/dry/logic/rule/predicate.rb, line 20
def to_s
  if args.size > 0
    "#{name}(#{args.map(&:inspect).join(", ")})"
  else
    name.to_s
  end
end
type() click to toggle source
# File lib/dry/logic/rule/predicate.rb, line 12
def type
  :predicate
end