Class: Y2Packager::ReleaseNotesFetchers::Base

Inherits:
Object
  • Object
show all
Includes:
Yast::Logger
Defined in:
library/packages/src/lib/y2packager/release_notes_fetchers/base.rb

Overview

Base class for release notes fetchers

A release note fetcher offers a mechanism to get release notes from a determined source. If you want to define a new way of getting release notes for a given product, you should define a class that inherits from this Base class and implements its API.

See Also:

Direct Known Subclasses

Rpm, Url

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(product) ⇒ Base

Constructor

Parameters:



33
34
35
# File 'library/packages/src/lib/y2packager/release_notes_fetchers/base.rb', line 33

def initialize(product)
  @product = product
end

Instance Attribute Details

#productProduct (readonly)

Returns Product to get release notes for

Returns:

  • (Product)

    Product to get release notes for



28
29
30
# File 'library/packages/src/lib/y2packager/release_notes_fetchers/base.rb', line 28

def product
  @product
end

Instance Method Details

#latest_versionString, Symbol

Return release notes latest version identifier

Returns:

  • (String, Symbol)

    Latest version identifier

Raises:

  • (NotImplementedError)


49
50
51
# File 'library/packages/src/lib/y2packager/release_notes_fetchers/base.rb', line 49

def latest_version
  raise NotImplementedError, "#latest_version not implemented"
end

#release_notes(_prefs) ⇒ String?

Get release notes for the given product

Parameters:

Returns:

  • (String, nil)

    Release notes or nil if a release notes were not found (no package providing release notes or notes not found in the package)

Raises:

  • (NotImplementedError)


42
43
44
# File 'library/packages/src/lib/y2packager/release_notes_fetchers/base.rb', line 42

def release_notes(_prefs)
  raise NotImplementedError, "#release_notes not implemented"
end