module RSpec::Core::Metadata
def self.relative_path(line)
-
(String)
- relative path to line
Parameters:
-
line
(String
) -- current code line
Other tags:
- Api: - private
def self.relative_path(line) line = line.sub(File.expand_path("."), ".") line = line.sub(/\A([^:]+:\d+)$/, '\\1') return nil if line == '-e:1' line rescue SecurityError nil end