Class: Homebrew::Livecheck::LivecheckVersion Private
- Includes:
- Comparable
- Defined in:
- livecheck/livecheck_version.rb
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
A formula or cask version, split into its component sub-versions.
Instance Attribute Summary collapse
- #versions ⇒ Array<Version> readonly private
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(versions) ⇒ void constructor private
Constructor Details
#initialize(versions) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
29 30 31 |
# File 'livecheck/livecheck_version.rb', line 29 def initialize(versions) @versions = versions end |
Instance Attribute Details
#versions ⇒ Array<Version> (readonly)
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
26 27 28 |
# File 'livecheck/livecheck_version.rb', line 26 def versions @versions end |
Class Method Details
.create(package_or_resource, version) ⇒ LivecheckVersion
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'livecheck/livecheck_version.rb', line 13 def self.create(package_or_resource, version) versions = case package_or_resource when Formula, Resource [version] when Cask::Cask version.to_s.split(",").map { |s| Version.new(s) } else T.absurd(package_or_resource) end new(versions) end |