Add bin and edit workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s

This commit is contained in:
2026-09-16 13:11:16 -06:00
parent c8ac4fcae5
commit 4cee170d66
17576 changed files with 895740 additions and 2 deletions
+34
View File
@@ -0,0 +1,34 @@
# frozen_string_literal: true
module TTFunk
# Sum aggreaget. Is sums all pushed values.
class Sum < Aggregate
# Value
#
# @return [#+]
attr_reader :value
# @param init_value [#+] initial value
def initialize(init_value = 0)
super()
@value = init_value
end
# Push a value. It will be added to the current value.
#
# @param operand [any]
# @return [void]
def <<(operand)
@value += coerce(operand)
end
# Get the stored value or default.
#
# @param _default [any] Unused. Here for API compatibility.
# @return [any]
def value_or(_default)
# value should always be non-nil
value
end
end
end