Sha256: 2e132557405493ee916b2ffbacf34d1ded73da2c6cd948a2937f230bafc41c32
Contents?: true
Size: 445 Bytes
Versions: 6
Compression:
Stored size: 445 Bytes
Contents
# frozen_string_literal: true require "dry/logic/operations/abstract" module Dry module Logic module Operations class Unary < Abstract attr_reader :rule def initialize(*rules, **options) super @rule = rules.first end def ast(input = Undefined) [type, rule.ast(input)] end def to_s "#{type}(#{rule})" end end end end end
Version data entries
6 entries across 6 versions & 2 rubygems