class RBT::Cookbooks::FindHeaders
Public Class Methods
Public Instance Methods
do_find_headers()
click to toggle source
#¶ ↑
do_find_headers
¶ ↑
#¶ ↑
# File lib/rbt/cookbooks/find_headers.rb, line 93 def do_find_headers headers = obtain_headers if headers.is_a? Array # Convert the Array into a String here. headers = headers.join(',').strip end headers.delete!(' ') if headers if headers.to_s.empty? opne "#{rev}No headers were found for #{steelblue(@input)}#{rev}." else report_that_we_have_found_these_headers(headers) end end
input?()
click to toggle source
obtain_headers(i = input?)
click to toggle source
report_that_we_have_found_these_headers(headers)
click to toggle source
#¶ ↑
report_that_we_have_found_these_headers
¶ ↑
We do assume here that the input argument to this method is a String which will contain ‘,’ characters.
#¶ ↑
# File lib/rbt/cookbooks/find_headers.rb, line 77 def report_that_we_have_found_these_headers(headers) if headers.include? ',' splitted = headers.split(',') else splitted = (headers+',').split(',') end opne "The following #{slateblue(splitted.size.to_s)}#{rev} header files "\ "were found for the program `#{sfancy(input?)}#{rev}`." splitted.each {|the_header| e " - #{the_header}" } end
reset()
click to toggle source
run()
click to toggle source