Class: Gistory::VersionChange

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/gistory/version_change.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(commit:, version:) ⇒ VersionChange

Returns a new instance of VersionChange.



12
13
14
15
16
# File 'lib/gistory/version_change.rb', line 12

def initialize(commit:, version:)
  @commit = commit
  @version = version
  freeze
end

Instance Attribute Details

#commitObject (readonly)

Returns the value of attribute commit.



10
11
12
# File 'lib/gistory/version_change.rb', line 10

def commit
  @commit
end

#versionObject (readonly)

Returns the value of attribute version.



10
11
12
# File 'lib/gistory/version_change.rb', line 10

def version
  @version
end

Instance Method Details

#to_sObject



18
19
20
# File 'lib/gistory/version_change.rb', line 18

def to_s
  "Version #{version} (on #{date} by #{short_hash})"
end