Files
news.gitea.happylizard.me/bin/gems/ttfunk-1.8.0/lib/ttfunk/aggregate.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

21 lines
346 B
Ruby

# frozen_string_literal: true
module TTFunk
# Base class for different aggregate values and accumulators.
#
# @see TTFunk::Min
# @see TTFunk::Max
# @see TTFunk::Sum
class Aggregate
private
def coerce(other)
if other.respond_to?(:value_or)
other.value_or(0)
else
other
end
end
end
end