class Gistory::Commit

Attributes

date[R]
short_hash[R]

Public Class Methods

new(short_hash:, date:) click to toggle source
# File lib/gistory/commit.rb, line 9
def initialize(short_hash:, date:)
  @short_hash = short_hash
  @date = DateTime.parse(date.to_s)
  freeze
end

Public Instance Methods

to_s() click to toggle source
# File lib/gistory/commit.rb, line 15
def to_s
  "Commit #{short_hash} on #{date}"
end