Sha256: 788e87b733da0b76676c4d46857b2001c9e234b61b53ca85510ed70581e39a7d
Contents?: true
Size: 497 Bytes
Versions: 15
Compression:
Stored size: 497 Bytes
Contents
# frozen_string_literal: true module Dry module Logic module Appliable def id options[:id] end def result options[:result] end def applied? !result.nil? end def success? result.equal?(true) end def failure? !success? end def to_ast if applied? && id [success? ? :success : :failure, [id, ast]] else ast end end end end end
Version data entries
15 entries across 15 versions & 2 rubygems