Class: Inch::Utils::CodeLocation

Inherits:
Struct
  • Object
show all
Defined in:
lib/inch/utils/code_location.rb

Overview

CodeLocation is a utility class to find declarations of objects in files

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#base_dirObject

Returns the value of attribute base_dir

Returns:

  • (Object)

    the current value of base_dir



5
6
7
# File 'lib/inch/utils/code_location.rb', line 5

def base_dir
  @base_dir
end

#line_noObject

Returns the value of attribute line_no

Returns:

  • (Object)

    the current value of line_no



5
6
7
# File 'lib/inch/utils/code_location.rb', line 5

def line_no
  @line_no
end

#relative_pathObject

Returns the value of attribute relative_path

Returns:

  • (Object)

    the current value of relative_path



5
6
7
# File 'lib/inch/utils/code_location.rb', line 5

def relative_path
  @relative_path
end

Instance Method Details

#filenameObject



7
8
9
# File 'lib/inch/utils/code_location.rb', line 7

def filename
  File.join(base_dir, relative_path)
end