class RBT::Cookbooks::AllowedCookbookEntries

Constants

NAMESPACE
#

NAMESPACE

#

Public Class Methods

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

AllowedCookbookEntries[]

#
# File lib/rbt/utility_scripts/allowed_cookbook_entries.rb, line 84
def self.[](i = '')
  self.new
end
e(i = '') click to toggle source
#

RBT::Cookbooks::AllowedCookbookEntries.e

#
# File lib/rbt/utility_scripts/allowed_cookbook_entries.rb, line 54
def self.e(i = '')
  RBT.e(i)
end
new( run_already = true ) click to toggle source
#

initialize

#
# File lib/rbt/utility_scripts/allowed_cookbook_entries.rb, line 37
def initialize(
    run_already = true
  )
  reset
  run if run_already
end
opnn() click to toggle source
#

AllowedCookbookEntries.opnn

#
# File lib/rbt/utility_scripts/allowed_cookbook_entries.rb, line 77
def self.opnn
  Opn.opn(use_this_as_namespace: NAMESPACE)
end
report_allowed_entries() click to toggle source
#

RBT::Cookbooks::AllowedCookbookEntries.report_allowed_entries

#
# File lib/rbt/utility_scripts/allowed_cookbook_entries.rb, line 61
def self.report_allowed_entries
  e; opnn; e 'The following entries are registered in the file '
  opnn; e RBT.sfile('registered_cookbook_entries.rb')+', in the '
  opnn; e 'constant '+RBT.simp('REGISTERED_COOKBOOK_ENTRIES')+', and '\
          'thus valid:'; e
  REGISTERED_COOKBOOK_ENTRIES.each_with_index {|entry, index|
    index += 1
    colourized_and_padded_index = RBT.sfancy(index.to_s.rjust(3))
    entry = mediumaquamarine(entry)
    e colourized_and_padded_index+') '+entry
  }; e # Need to output a terminating-newline here for consistency with the above.
end

Public Instance Methods

reset() click to toggle source
#

reset

#
Calls superclass method RBT::Base#reset
# File lib/rbt/utility_scripts/allowed_cookbook_entries.rb, line 47
def reset
  super()
end
run() click to toggle source
#

run

We redirect to a class method here.

#
# File lib/rbt/utility_scripts/allowed_cookbook_entries.rb, line 93
def run
  AllowedCookbookEntries.report_allowed_entries # Call the class method here.
end