Class: Kumi::Core::NAST::Fold
Overview
Semantic reduction over explicit axes, with kernel id (e.g., :“agg.sum”)
Instance Attribute Summary collapse
-
#arg ⇒ Object
readonly
Returns the value of attribute arg.
-
#fn ⇒ Object
readonly
Returns the value of attribute fn.
Attributes inherited from Node
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(fn:, arg:, **k) ⇒ Fold
constructor
A new instance of Fold.
Constructor Details
#initialize(fn:, arg:, **k) ⇒ Fold
Returns a new instance of Fold.
180 181 182 183 184 |
# File 'lib/kumi/core/nast.rb', line 180 def initialize(fn:, arg:, **k) super(**k) @fn = fn.to_sym @arg = arg end |
Instance Attribute Details
#arg ⇒ Object (readonly)
Returns the value of attribute arg.
178 179 180 |
# File 'lib/kumi/core/nast.rb', line 178 def arg @arg end |
#fn ⇒ Object (readonly)
Returns the value of attribute fn.
178 179 180 |
# File 'lib/kumi/core/nast.rb', line 178 def fn @fn end |
Instance Method Details
#accept(visitor) ⇒ Object
186 187 188 |
# File 'lib/kumi/core/nast.rb', line 186 def accept(visitor) visitor.respond_to?(:visit_fold) ? visitor.visit_fold(self) : super end |