Sha256: f366e83efa43bc88001ab0cf30cf5dd9d67ec187e22a1e53e5bfbb6d096af8b1

Contents?: true

Size: 475 Bytes

Versions: 2

Compression:

Stored size: 475 Bytes

Contents

module PairSee
  class Card
    attr_reader :card_name, :number_of_commits

    def initialize(card_name, number_of_commits, first_date, last_date)
      @card_name = card_name
      @number_of_commits = number_of_commits
      @first_date, @last_date = first_date, last_date
    end

    def duration
      (@first_date - @last_date).to_i + 1
    end

    def ==(other)
      card_name == other.card_name
      number_of_commits == other.number_of_commits
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pair_see-0.1.4 lib/pair_see/card.rb
pair_see-0.1.3 lib/pair_see/card.rb