class RBT::Cookbooks::ShowDependenciesOf
Public Class Methods
Public Instance Methods
gather_all_unique_dependencies_for( i, array_all_dependencies = @array_all_dependencies )
click to toggle source
#¶ ↑
gather_all_unique_dependencies_for
¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/show_dependencies_of.rb, line 130 def gather_all_unique_dependencies_for( i, array_all_dependencies = @array_all_dependencies ) i = sanitize_this_array(i) array_all_dependencies << i # ======================================================================= # # Next add more to that Array. # ======================================================================= # i.each {|entry| _ = action(:SanitizeCookbook, entry) { :fast } deps = _.required_deps_on? if deps # Must catch stray nils. array_all_dependencies << sanitize_this_array(deps) array_all_dependencies.flatten! array_all_dependencies.uniq! end } end
program?()
click to toggle source
report( i = @array_all_dependencies )
click to toggle source
#¶ ↑
report¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/show_dependencies_of.rb, line 113 def report( i = @array_all_dependencies ) e "#{rev}All gathered dependencies of `#{sfancy(program?.to_s)}#{rev}` are:" e i.each_with_index {|entry, index| index += 1 padded_index = royalblue( ("(#{index})").rjust(5) ) e "#{rev} #{padded_index} #{steelblue(entry)}" } e end
report_these_dependencies(deps)
click to toggle source
#¶ ↑
report_these_dependencies
¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/show_dependencies_of.rb, line 75 def report_these_dependencies(deps) if deps.empty? opne "#{rev}No dependencies have been found "\ "for `#{sfancy(program?.to_s)}#{rev}`." else opne rev+'The (direct) dependencies of `'+sfancy(program?.to_s)+rev+ '` are:' e deps.each_with_index {|entry, index| index += 1 index = index.to_s.rjust(deps.size.to_s.size) index = slateblue(index.to_s) e "#{rev} (#{index.to_s}) #{steelblue(entry)}" }; e end end
reset()
click to toggle source
#¶ ↑
reset¶ ↑
#¶ ↑
Calls superclass method
RBT::LeanPrototype#reset
# File lib/rbt/utility_scripts/show_dependencies_of.rb, line 46 def reset super() infer_the_namespace # ======================================================================= # # === @array_all_dependencies # ======================================================================= # @array_all_dependencies = [] end
run()
click to toggle source
sanitize_this_array(i)
click to toggle source
set_of_this_program(of_this_program)
click to toggle source