Class: Inch::CodeObject::Provider::YARD::Object::Base::CodeLocation

Inherits:
Struct
  • Object
show all
Defined in:
lib/inch/code_object/provider/yard/object/base.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



95
96
97
# File 'lib/inch/code_object/provider/yard/object/base.rb', line 95

def base_dir
  @base_dir
end

#line_noObject

Returns the value of attribute line_no

Returns:

  • (Object)

    the current value of line_no



95
96
97
# File 'lib/inch/code_object/provider/yard/object/base.rb', line 95

def line_no
  @line_no
end

#relative_pathObject

Returns the value of attribute relative_path

Returns:

  • (Object)

    the current value of relative_path



95
96
97
# File 'lib/inch/code_object/provider/yard/object/base.rb', line 95

def relative_path
  @relative_path
end

Instance Method Details

#filenameObject



96
97
98
# File 'lib/inch/code_object/provider/yard/object/base.rb', line 96

def filename
  File.join(base_dir, relative_path)
end