class Assert::FileLine
Attributes
file[R]
line[R]
Public Class Methods
new(file = nil, line = nil)
click to toggle source
# File lib/assert/file_line.rb, line 11 def initialize(file = nil, line = nil) @file, @line = file.to_s, line.to_s end
parse(file_line_path)
click to toggle source
# File lib/assert/file_line.rb, line 5 def self.parse(file_line_path) new(*(file_line_path.to_s.match(/(^[^\:]*)\:*(\d*).*$/) || [])[1..2]) end
Public Instance Methods
==(other)
click to toggle source
Calls superclass method
# File lib/assert/file_line.rb, line 19 def ==(other) if other.is_a?(FileLine) file == other.file && line == other.line else super end end
to_s()
click to toggle source
# File lib/assert/file_line.rb, line 15 def to_s "#{file}:#{line}" end