class RBT::Cookbooks::NewCheckForGnomeUpdates

Constants

NAMESPACE
#

NAMESPACE

#
ONE_DAY
#

ONE_DAY

#
TRAILING_END_OF_THE_REMOTE_WEBPAGE
#

TRAILING_END_OF_THE_REMOTE_WEBPAGE

#
USE_ONLY_STABLE_GNOME_VERSIONS
#

USE_ONLY_STABLE_GNOME_VERSIONS

If the following constant is set to true, we will only use stable gnome versions for the purpose of this class here. So for example, any program with version names such “2.27.1” will be ignored. The user will be notified about this on startup.

#

Public Class Methods

[](i = '') click to toggle source
#

[]

#
# File lib/rbt/check_for_updates/NEW_check_for_gnome_updates.rb, line 143
def self.[](i = '')
  self.new(i)
end
new( i = nil, run_already = true ) click to toggle source
#

initialize

#
# File lib/rbt/check_for_updates/NEW_check_for_gnome_updates.rb, line 56
def initialize(
    i           = nil,
    run_already = true
  )
  reset
  set_commandline_arguments(i)
  run if run_already
end

Public Instance Methods

also_check_for_unstable_gnome_versions() click to toggle source
#

also_check_for_unstable_gnome_versions

By default, this method will be silent. If you need to send a message to the user, you have to do so on your own.

#
# File lib/rbt/check_for_updates/NEW_check_for_gnome_updates.rb, line 81
def also_check_for_unstable_gnome_versions
  @use_only_stable_gnome_versions = false
end
commandline_arguments?() click to toggle source
#

commandline_arguments?

#
# File lib/rbt/check_for_updates/NEW_check_for_gnome_updates.rb, line 95
def commandline_arguments?
  @commandline_arguments
end
Also aliased as: input?
consider_notifying_the_user_about_using_only_stable_gnome_versions() click to toggle source
#

consider_notifying_the_user_about_using_only_stable_gnome_versions

#
# File lib/rbt/check_for_updates/NEW_check_for_gnome_updates.rb, line 102
def consider_notifying_the_user_about_using_only_stable_gnome_versions
  if @use_only_stable_gnome_versions
    opnn; e 'Only stable versions will be considered for this class, as the'
    opnn; e 'variable '+orange('@use_only_stable_gnome_versions')+
            ' has been set to true.'
    opnn; e 'If this is unwanted, pass in the option '+
            slateblue('--unstable')+' to this class.'
  end
end
input?()
menu( i = commandline_arguments? ) click to toggle source
#

menu (menu tag)

#
reset() click to toggle source
#

reset (reset tag)

#
Calls superclass method
# File lib/rbt/check_for_updates/NEW_check_for_gnome_updates.rb, line 68
def reset
  super()
  @namespace = NAMESPACE
  @use_only_stable_gnome_versions = USE_ONLY_STABLE_GNOME_VERSIONS
  @array_updated_these_entries = [] # <- Which programs were updated is kept in this Array.
end
run() click to toggle source
#

run (run tag)

#
# File lib/rbt/check_for_updates/NEW_check_for_gnome_updates.rb, line 135
def run
  menu
  consider_notifying_the_user_about_using_only_stable_gnome_versions
end
set_commandline_arguments(i = '') click to toggle source
#

set_commandline_arguments

#
# File lib/rbt/check_for_updates/NEW_check_for_gnome_updates.rb, line 88
def set_commandline_arguments(i = '')
  @commandline_arguments = i
end