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 7
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 27
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 15
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 19
def to_s
  if args.empty?
    name.to_s
  else
    "#{name}(#{args.map(&:inspect).join(", ")})"
  end
end
type() click to toggle source
# File lib/dry/logic/rule/predicate.rb, line 11
def type
  :predicate
end