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 104
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 93
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 61
def self.report_allowed_entries(
    namespace = inspect
  )
  e; opnn(namespace)
  e
  e
  e rev+'The following entries are registered in the file '
  e ::RBT.sfile('registered_cookbook_entries.rb')+rev+', in the '
  e rev+'constant '+
    ::RBT.simp('REGISTERED_COOKBOOK_ENTRIES')+
    rev+', 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}#{rev}) #{entry}"
  }; e # Need to output a terminating-newline here for consistency with the above.
end
rev() click to toggle source
#

RBT::Cookbooks::AllowedCookbookEntries.rev

#
# File lib/rbt/checks_and_validations/allowed_cookbook_entries.rb, line 54
def self.rev
  ::RBT.rev
end

Public Instance Methods

reset() click to toggle source
#

reset

#
Calls superclass method RBT::LeanPrototype#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 86
def run
  AllowedCookbookEntries.report_allowed_entries # Call the class method here.
end