class RBT::Headers
Public Class Methods
[](i = '')
click to toggle source
Public Instance Methods
check_whether_the_input_is_a_header_file()
click to toggle source
load_up_the_registered_headers( i = RBT.file_registered_headers )
click to toggle source
match?()
click to toggle source
report()
click to toggle source
reset()
click to toggle source
#¶ ↑
reset (reset tag)¶ ↑
#¶ ↑
Calls superclass method
RBT::Base#reset
# File lib/rbt/headers/headers.rb, line 41 def reset super() infer_the_namespace # ======================================================================= # # === @match # ======================================================================= # @match = nil # ======================================================================= # # === @do_report # # By default this class will not report. # ======================================================================= # @do_report = false end
run()
click to toggle source
try_to_find_a_match_for_the_given_input()
click to toggle source
#¶ ↑
try_to_find_a_match_for_the_given_input
¶ ↑
#¶ ↑
# File lib/rbt/headers/headers.rb, line 71 def try_to_find_a_match_for_the_given_input first_argument = first_argument? if first_argument.nil? e "#{rev}Please provide some input, such as #{steelblue('ao.h')}." else # ===================================================================== # # First check whether such a file exists in the registered headers. # ===================================================================== # if @registered_headers.has_key? first_argument @match = @registered_headers[first_argument] else # else we need to find any .header file. if @registered_headers.keys.any? {|entry| entry.end_with?("/#{first_argument}") } selection = @registered_headers.select {|header_file, name_of_the_program_at_hand| header_file.end_with?("/#{first_argument}") } if selection.empty? e "No match has been found for the given "\ "input #{steelblue(first_argument)}." else @match = selection[selection.keys.first] end end end end end