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



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

def base_dir
  @base_dir
end

#line_noObject

Returns the value of attribute line_no

Returns:

  • (Object)

    the current value of line_no



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

def line_no
  @line_no
end

#relative_pathObject

Returns the value of attribute relative_path

Returns:

  • (Object)

    the current value of relative_path



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

def relative_path
  @relative_path
end

Instance Method Details

#filenameObject



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

def filename
  File.join(base_dir, relative_path)
end