Class: EndOfLife::Repository
- Inherits:
-
Object
- Object
- EndOfLife::Repository
- Defined in:
- lib/end_of_life/repository.rb,
lib/end_of_life/repository/search.rb,
lib/end_of_life/repository/search/query.rb
Defined Under Namespace
Classes: Search
Instance Attribute Summary collapse
-
#full_name ⇒ Object
readonly
Returns the value of attribute full_name.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(full_name:, url:, github_client:) ⇒ Repository
constructor
A new instance of Repository.
- #min_release_of(product) ⇒ Object
- #using_eol?(product, at: Date.today) ⇒ Boolean
Constructor Details
#initialize(full_name:, url:, github_client:) ⇒ Repository
Returns a new instance of Repository.
9 10 11 12 13 14 |
# File 'lib/end_of_life/repository.rb', line 9 def initialize(full_name:, url:, github_client:) @full_name = full_name @url = url @github_client = github_client @product_releases = {} end |
Instance Attribute Details
#full_name ⇒ Object (readonly)
Returns the value of attribute full_name.
7 8 9 |
# File 'lib/end_of_life/repository.rb', line 7 def full_name @full_name end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
7 8 9 |
# File 'lib/end_of_life/repository.rb', line 7 def url @url end |
Class Method Details
.search(options) ⇒ Object
4 |
# File 'lib/end_of_life/repository.rb', line 4 def search() = Search.new().result |
Instance Method Details
#min_release_of(product) ⇒ Object
20 |
# File 'lib/end_of_life/repository.rb', line 20 def min_release_of(product) = releases_for(product).min |
#using_eol?(product, at: Date.today) ⇒ Boolean
16 17 18 |
# File 'lib/end_of_life/repository.rb', line 16 def using_eol?(product, at: Date.today) min_release_of(product)&.eol?(at: at) end |