Class: Desi::Upstream::Release
- Inherits:
-
Struct
- Object
- Struct
- Desi::Upstream::Release
- Defined in:
- lib/desi/upstream.rb
Instance Attribute Summary collapse
-
#download_url ⇒ Object
Returns the value of attribute download_url.
-
#version_name ⇒ Object
Returns the value of attribute version_name.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #===(name_or_version) ⇒ Object
- #filename ⇒ Object
- #name ⇒ Object
- #sortable_version ⇒ Object protected
- #to_s ⇒ Object
- #version ⇒ Object
Instance Attribute Details
#download_url ⇒ Object
Returns the value of attribute download_url
10 11 12 |
# File 'lib/desi/upstream.rb', line 10 def download_url @download_url end |
#version_name ⇒ Object
Returns the value of attribute version_name
10 11 12 |
# File 'lib/desi/upstream.rb', line 10 def version_name @version_name end |
Instance Method Details
#<=>(other) ⇒ Object
27 28 29 |
# File 'lib/desi/upstream.rb', line 27 def <=>(other) other.sortable_version <=> sortable_version end |
#===(name_or_version) ⇒ Object
23 24 25 |
# File 'lib/desi/upstream.rb', line 23 def ===(name_or_version) name_or_version == version || name_or_version == name || name_or_version == "v#{version}" end |
#filename ⇒ Object
19 20 21 |
# File 'lib/desi/upstream.rb', line 19 def filename "elasticsearch-#{version}.tar.gz" end |
#name ⇒ Object
15 16 17 |
# File 'lib/desi/upstream.rb', line 15 def name "elasticsearch-#{version}" end |
#sortable_version ⇒ Object (protected)
37 38 39 |
# File 'lib/desi/upstream.rb', line 37 def sortable_version @sortable_version ||= Semantic::Version.new(version.sub(%r{.(beta|alpha|rc)}i, '-\1')) end |
#to_s ⇒ Object
11 12 13 |
# File 'lib/desi/upstream.rb', line 11 def to_s name end |
#version ⇒ Object
31 32 33 |
# File 'lib/desi/upstream.rb', line 31 def version version_name.gsub(/^v/, '') end |