Method: MakeMakefile#checking_message

Defined in:
lib/mkmf.rb

#checking_message(target, place = nil, opt = nil) ⇒ Object



980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
# File 'lib/mkmf.rb', line 980

def checking_message(target, place = nil, opt = nil)
  [["in", place], ["with", opt]].inject("#{target}") do |msg, (pre, noun)|
    if noun
      [[:to_str], [:join, ","], [:to_s]].each do |meth, *args|
        if noun.respond_to?(meth)
          break noun = noun.send(meth, *args)
        end
      end
      unless noun.empty?
        msg << " #{pre} " unless msg.empty?
        msg << noun
      end
    end
    msg
  end
end