Sha256: cf3c720cbfbe2a36df889f85be8c75f5ba8bbeb197f6a0b3bc6d17c7144da1be
Contents?: true
Size: 560 Bytes
Versions: 60
Compression:
Stored size: 560 Bytes
Contents
class ExecutionPoint attr_reader :backtrace def self.current new(caller) end def initialize(backtrace) @backtrace = backtrace end def file_name /\A(.*?):\d+/.match(@backtrace.first)[1] end def line_number Integer(/\A.*?:(\d+)/.match(@backtrace.first)[1]) end def ==(other) return false unless other.is_a?(ExecutionPoint) (file_name == other.file_name) and (line_number == other.line_number) end def to_s "file: #{file_name} line: #{line_number}" end def inspect to_s end end
Version data entries
60 entries across 60 versions & 5 rubygems