Class: Gistory::VersionChange
- Inherits:
-
Object
- Object
- Gistory::VersionChange
- Extended by:
- Forwardable
- Defined in:
- lib/gistory/version_change.rb
Instance Attribute Summary collapse
-
#commit ⇒ Object
readonly
Returns the value of attribute commit.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(commit:, version:) ⇒ VersionChange
constructor
A new instance of VersionChange.
- #to_s ⇒ Object
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
#commit ⇒ Object (readonly)
Returns the value of attribute commit.
10 11 12 |
# File 'lib/gistory/version_change.rb', line 10 def commit @commit end |
#version ⇒ Object (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_s ⇒ Object
18 19 20 |
# File 'lib/gistory/version_change.rb', line 18 def to_s "Version #{version} (on #{date} by #{short_hash})" end |