Method: Debugger::CommandProcessor.canonic_file

Defined in:
lib/ruby-debug/processor.rb

.canonic_file(filename) ⇒ Object

Regularize file name. This is also used as a common funnel place if basename is desired or if we are working remotely and want to change the basename. Or we are eliding filenames.



113
114
115
116
117
118
119
120
121
# File 'lib/ruby-debug/processor.rb', line 113

def self.canonic_file(filename)
  # For now we want resolved filenames
  if Command.settings[:basename]
    File.basename(filename)
  else
    # Cache this?
    Pathname.new(filename).cleanpath.to_s
  end
end