Sha256: 04d1e12afbd9081d950216fd0de055429215fe9aaef929b77d784be9b595d9e9
Contents?: true
Size: 620 Bytes
Versions: 4
Compression:
Stored size: 620 Bytes
Contents
# frozen_string_literal: true module Dry module Logic class Rule class Predicate < Rule def self.specialize(arity, curried, base = Predicate) super end def type :predicate end def name predicate.name end def to_s if args.empty? name.to_s else "#{name}(#{args.map(&:inspect).join(", ")})" end end def ast(input = Undefined) [type, [name, args_with_names(input)]] end alias_method :to_ast, :ast end end end end
Version data entries
4 entries across 4 versions & 1 rubygems