Sha256: 20a870a1ad1b1bc790ca6351e9b0882a0fdc8b8057a52181ab191a091d4fc916
Contents?: true
Size: 320 Bytes
Versions: 15
Compression:
Stored size: 320 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
15 entries across 15 versions & 1 rubygems