Class: Upfluence::Peer::Version
- Inherits:
-
Object
- Object
- Upfluence::Peer::Version
- Defined in:
- lib/upfluence/peer.rb
Defined Under Namespace
Classes: GitVersion, SemanticVersion
Constant Summary collapse
- DEFAULT_VERSION =
'v0.0.0-dirty'.freeze
Instance Attribute Summary collapse
-
#git ⇒ Object
readonly
Returns the value of attribute git.
-
#semantic ⇒ Object
readonly
Returns the value of attribute semantic.
Instance Method Summary collapse
-
#initialize(git, semantic) ⇒ Version
constructor
A new instance of Version.
- #to_s ⇒ Object
Constructor Details
#initialize(git, semantic) ⇒ Version
Returns a new instance of Version.
61 62 63 64 |
# File 'lib/upfluence/peer.rb', line 61 def initialize(git, semantic) @git = git @semantic = semantic end |
Instance Attribute Details
#git ⇒ Object (readonly)
Returns the value of attribute git.
59 60 61 |
# File 'lib/upfluence/peer.rb', line 59 def git @git end |
#semantic ⇒ Object (readonly)
Returns the value of attribute semantic.
59 60 61 |
# File 'lib/upfluence/peer.rb', line 59 def semantic @semantic end |
Instance Method Details
#to_s ⇒ Object
66 67 68 69 70 71 |
# File 'lib/upfluence/peer.rb', line 66 def to_s return @semantic.to_s if @semantic return @git.to_s if @git DEFAULT_VERSION end |