class CutePrint::Location

@api private

Attributes

line_number[R]
path[R]

Public Class Methods

find() click to toggle source
# File lib/cute_print/location.rb, line 9
def self.find
  path, line_number = nearest_foreign_caller.split(':')
  line_number = line_number.to_i
  new(path, line_number)
end
new(path, line_number) click to toggle source
# File lib/cute_print/location.rb, line 18
def initialize(path, line_number)
  @path = path
  @line_number = line_number
end

Public Instance Methods

filename() click to toggle source
# File lib/cute_print/location.rb, line 23
def filename
  File.basename(@path)
end