Class: EndOfLife::Repository

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

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_nameObject (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

#urlObject (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(options) = Search.new(options).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

Returns:

  • (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