Sha256: 3869bc6248330ae2bf9b15994988d0997b7b9561bd5f70abb2c4197a8dbf53f2
Contents?: true
Size: 416 Bytes
Versions: 18
Compression:
Stored size: 416 Bytes
Contents
module Datacaster class OrNode < Base def initialize(left, right) @left = left @right = right end def cast(object, runtime:) left_result = @left.with_runtime(runtime).(object) return left_result if left_result.valid? @right.with_runtime(runtime).(object) end def inspect "#<Datacaster::OrNode L: #{@left.inspect} R: #{@right.inspect}>" end end end
Version data entries
18 entries across 18 versions & 1 rubygems