Sha256: 4d983f023298725df35eeef28612158ff614e02a1462d53c7b9bd3bcf7991fbc
Contents?: true
Size: 320 Bytes
Versions: 1
Compression:
Stored size: 320 Bytes
Contents
module Cassanity def self.Addition(*args) Addition.new(*args) end class Addition < Operator # Public: Returns an addition instance def initialize(*args) values = args.flatten.compact raise ArgumentError.new("value cannot be nil") if values.empty? super :+, values end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cassanity-0.6.0 | lib/cassanity/addition.rb |