Sha256: 1c42b7769052fd6d2874ae6e679145fc476d912bcce04ed24856d070514d79b8
Contents?: true
Size: 288 Bytes
Versions: 1
Compression:
Stored size: 288 Bytes
Contents
class Array include Straightedge::Aspects::Positional include Straightedge::Aspects::Figural def second; self[1] end def third; self[2] end def sum(&blk) if block_given? map(&blk).sum else inject(&:+) end end def mean sum / size end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
straightedge-0.1.2 | lib/straightedge/extend/array.rb |