Class: Y2Packager::ReleaseNotesContentPrefs

Inherits:
Struct
  • Object
show all
Defined in:
library/packages/src/lib/y2packager/release_notes_content_prefs.rb

Overview

Content preferences for release notes

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fallback_langSymbol

Returns Language to use if release notes for user_lang are not available

Returns:

  • (Symbol)

    Language to use if release notes for user_lang are not available



22
23
24
25
26
27
28
# File 'library/packages/src/lib/y2packager/release_notes_content_prefs.rb', line 22

ReleaseNotesContentPrefs = Struct.new(:user_lang, :fallback_lang, :format) do
  # @return [String] Human readable representation of content preferences
  def to_s
    "content preferences: language '#{user_lang}', fallback language: '#{fallback_lang}', "\
      "and format '#{format}'"
  end
end

#formatSymbol

Returns Release notes format (:txt or :rtf)

Returns:

  • (Symbol)

    Release notes format (:txt or :rtf)



22
23
24
25
26
27
28
# File 'library/packages/src/lib/y2packager/release_notes_content_prefs.rb', line 22

ReleaseNotesContentPrefs = Struct.new(:user_lang, :fallback_lang, :format) do
  # @return [String] Human readable representation of content preferences
  def to_s
    "content preferences: language '#{user_lang}', fallback language: '#{fallback_lang}', "\
      "and format '#{format}'"
  end
end

#user_langString

Returns User preferred language

Returns:

  • (String)

    User preferred language



22
23
24
25
26
27
28
# File 'library/packages/src/lib/y2packager/release_notes_content_prefs.rb', line 22

ReleaseNotesContentPrefs = Struct.new(:user_lang, :fallback_lang, :format) do
  # @return [String] Human readable representation of content preferences
  def to_s
    "content preferences: language '#{user_lang}', fallback language: '#{fallback_lang}', "\
      "and format '#{format}'"
  end
end

Instance Method Details

#to_sString

Returns Human readable representation of content preferences

Returns:

  • (String)

    Human readable representation of content preferences



24
25
26
27
# File 'library/packages/src/lib/y2packager/release_notes_content_prefs.rb', line 24

def to_s
  "content preferences: language '#{user_lang}', fallback language: '#{fallback_lang}', "\
    "and format '#{format}'"
end