class RBT::Cookbooks::AllowedCookbookEntries

Public Class Methods

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

RBT::Cookbooks::AllowedCookbookEntries[]

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

RBT::Cookbooks::AllowedCookbookEntries.e

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

initialize

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

AllowedCookbookEntries.opnn

#
# File lib/rbt/checks_and_validations/allowed_cookbook_entries.rb, line 85
def self.opnn(
    namespace = NAMESPACE
  )
  Opn.opn(
    use_this_as_namespace: namespace
  )
end
report_allowed_entries( namespace = inspect ) click to toggle source
#

RBT::Cookbooks::AllowedCookbookEntries.report_allowed_entries

#
# File lib/rbt/checks_and_validations/allowed_cookbook_entries.rb, line 54
def self.report_allowed_entries(
    namespace = inspect
  )
  e; opnn(namespace)
  e
  e
  e 'The following entries are registered in the file '
  e ::RBT.sfile('registered_cookbook_entries.rb')+', in the '
  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 = Colours.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/checks_and_validations/allowed_cookbook_entries.rb, line 39
def reset
  super()
  infer_the_namespace
end
run() click to toggle source
#

run

We redirect to a class method here.

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