Class: Upfluence::Peer::Version::GitVersion
- Inherits:
-
Object
- Object
- Upfluence::Peer::Version::GitVersion
- Defined in:
- lib/upfluence/peer.rb
Instance Attribute Summary collapse
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#commit ⇒ Object
readonly
Returns the value of attribute commit.
-
#remote ⇒ Object
readonly
Returns the value of attribute remote.
Instance Method Summary collapse
-
#initialize(commit:, remote: nil, branch: nil) ⇒ GitVersion
constructor
A new instance of GitVersion.
- #to_s ⇒ Object
Constructor Details
#initialize(commit:, remote: nil, branch: nil) ⇒ GitVersion
Returns a new instance of GitVersion.
46 47 48 49 50 |
# File 'lib/upfluence/peer.rb', line 46 def initialize(commit:, remote: nil, branch: nil) @commit = commit @remote = remote @branch = branch end |
Instance Attribute Details
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
44 45 46 |
# File 'lib/upfluence/peer.rb', line 44 def branch @branch end |
#commit ⇒ Object (readonly)
Returns the value of attribute commit.
44 45 46 |
# File 'lib/upfluence/peer.rb', line 44 def commit @commit end |
#remote ⇒ Object (readonly)
Returns the value of attribute remote.
44 45 46 |
# File 'lib/upfluence/peer.rb', line 44 def remote @remote end |
Instance Method Details
#to_s ⇒ Object
52 53 54 |
# File 'lib/upfluence/peer.rb', line 52 def to_s "v0.0.0+git-#{@commit[0..6]}" end |