Sha256: 515e0ea38762e74246ed2b05daa639a70bb4844863ff69be7d46818b4da0942e
Contents?: true
Size: 321 Bytes
Versions: 6
Compression:
Stored size: 321 Bytes
Contents
# frozen_string_literal: true class Transaction attr_reader :value, :type def initialize(value:, type:) @value = value @type = type end def positive? type == 'income' end def ==(other) return false unless other.class == self.class other.value == value && other.type == type end end
Version data entries
6 entries across 6 versions & 1 rubygems