class Cookbooks::ShowDependenciesOn
Constants
- NAMESPACE
#¶ ↑
NAMESPACE¶ ↑
#¶ ↑
Public Class Methods
Public Instance Methods
add(i)
click to toggle source
fetch_all_programs_that_depend_on_the_given_input()
click to toggle source
#¶ ↑
#fetch_all_programs_that_depend_on_the_given_input¶ ↑
#¶ ↑
# File lib/cookbooks/utility_scripts/show_dependencies_on.rb, line 118 def fetch_all_programs_that_depend_on_the_given_input all_cookbook_files = cookbook_files?(:show_full_path) all_cookbook_files.each {|file| file = File.basename(file) dataset = Cookbooks::Cookbook.new(file) { :bypass_menu } data = dataset.dependencies_on? unless data.nil? add(file) if data.include? input? # Add it if the input is part of the dependencies. end } end
input?()
click to toggle source
notify_the_user_that_this_might_take_a_while()
click to toggle source
#¶ ↑
#notify_the_user_that_this_might_take_a_while¶ ↑
#¶ ↑
# File lib/cookbooks/utility_scripts/show_dependencies_on.rb, line 102 def notify_the_user_that_this_might_take_a_while opnn; e 'Scanning through the available programs next to find out' opnn; e 'which programs depend on '+sfancy(input?)+'. This may take a while,' opnn; e 'please be patient.' end
opnn()
click to toggle source
report_which_programs_depend_on_the_given_input( i = @array_programs )
click to toggle source
#¶ ↑
#report_which_programs_depend_on_the_given_input (report tag)¶ ↑
#¶ ↑
# File lib/cookbooks/utility_scripts/show_dependencies_on.rb, line 82 def report_which_programs_depend_on_the_given_input( i = @array_programs ) opnn; e 'These '+sfancy(i.size.to_s)+' programs '\ 'depend on '+simp(input?)+':' i.each_with_index {|entry, index| index += 1 index = index.to_s.rjust(i.size.to_s.size) if Object.const_defined? :Colours index = slateblue(index.to_s) end index = ('('+index.to_s+')').rjust(4) entry = teal(entry) e ' '+index.to_s+' '+entry } end
Also aliased as: report
reset()
click to toggle source
run()
click to toggle source