Class: Dependabot::Package::PackageRelease
- Inherits:
-
Object
- Object
- Dependabot::Package::PackageRelease
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/package/package_release.rb
Instance Attribute Summary collapse
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#downloads ⇒ Object
readonly
Returns the value of attribute downloads.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#latest ⇒ Object
readonly
Returns the value of attribute latest.
-
#package_type ⇒ Object
readonly
Returns the value of attribute package_type.
-
#released_at ⇒ Object
readonly
Returns the value of attribute released_at.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
-
#yanked ⇒ Object
readonly
Returns the value of attribute yanked.
-
#yanked_reason ⇒ Object
readonly
Returns the value of attribute yanked_reason.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(version:, released_at: nil, latest: false, yanked: false, yanked_reason: nil, downloads: nil, url: nil, package_type: nil, language: nil, tag: nil, details: {}) ⇒ PackageRelease
constructor
A new instance of PackageRelease.
- #to_s ⇒ Object
- #yanked? ⇒ Boolean
Constructor Details
#initialize(version:, released_at: nil, latest: false, yanked: false, yanked_reason: nil, downloads: nil, url: nil, package_type: nil, language: nil, tag: nil, details: {}) ⇒ PackageRelease
Returns a new instance of PackageRelease.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/dependabot/package/package_release.rb', line 30 def initialize( version:, released_at: nil, latest: false, yanked: false, yanked_reason: nil, downloads: nil, url: nil, package_type: nil, language: nil, tag: nil, details: {} ) @version = version @released_at = released_at @latest = latest @yanked = yanked @yanked_reason = yanked_reason @downloads = downloads @url = url @package_type = package_type @language = language @tag = tag @details = details end |
Instance Attribute Details
#details ⇒ Object (readonly)
Returns the value of attribute details.
87 88 89 |
# File 'lib/dependabot/package/package_release.rb', line 87 def details @details end |
#downloads ⇒ Object (readonly)
Returns the value of attribute downloads.
72 73 74 |
# File 'lib/dependabot/package/package_release.rb', line 72 def downloads @downloads end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
81 82 83 |
# File 'lib/dependabot/package/package_release.rb', line 81 def language @language end |
#latest ⇒ Object (readonly)
Returns the value of attribute latest.
63 64 65 |
# File 'lib/dependabot/package/package_release.rb', line 63 def latest @latest end |
#package_type ⇒ Object (readonly)
Returns the value of attribute package_type.
78 79 80 |
# File 'lib/dependabot/package/package_release.rb', line 78 def package_type @package_type end |
#released_at ⇒ Object (readonly)
Returns the value of attribute released_at.
60 61 62 |
# File 'lib/dependabot/package/package_release.rb', line 60 def released_at @released_at end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
84 85 86 |
# File 'lib/dependabot/package/package_release.rb', line 84 def tag @tag end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
75 76 77 |
# File 'lib/dependabot/package/package_release.rb', line 75 def url @url end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
57 58 59 |
# File 'lib/dependabot/package/package_release.rb', line 57 def version @version end |
#yanked ⇒ Object (readonly)
Returns the value of attribute yanked.
66 67 68 |
# File 'lib/dependabot/package/package_release.rb', line 66 def yanked @yanked end |
#yanked_reason ⇒ Object (readonly)
Returns the value of attribute yanked_reason.
69 70 71 |
# File 'lib/dependabot/package/package_release.rb', line 69 def yanked_reason @yanked_reason end |
Instance Method Details
#==(other) ⇒ Object
95 96 97 98 99 |
# File 'lib/dependabot/package/package_release.rb', line 95 def ==(other) return false unless other.is_a?(PackageRelease) version == other.version end |
#to_s ⇒ Object
102 103 104 |
# File 'lib/dependabot/package/package_release.rb', line 102 def to_s version.to_s end |
#yanked? ⇒ Boolean
90 91 92 |
# File 'lib/dependabot/package/package_release.rb', line 90 def yanked? @yanked end |