lib/inch/language/elixir/provider/reader/object/base.rb in inch-0.5.7 vs lib/inch/language/elixir/provider/reader/object/base.rb in inch-0.5.8

- old
+ new

@@ -1,6 +1,7 @@ require 'inch/language/elixir/provider/reader/docstring' +require 'inch/utils/code_location' module Inch module Language module Elixir module Provider @@ -20,15 +21,17 @@ def fullname fail NotImplementedError end def files - [] + return [] if location.empty? + file, line_no = location[0], location[1] + [Inch::Utils::CodeLocation.new('', file, line_no)] end def filename - nil + location[0] end attr_writer :children_fullnames def children_fullnames @children_fullnames ||= [] @@ -189,9 +192,15 @@ original_docstring.nil? || original_docstring.to_s.strip.empty? end def visibility :public + end + + private + + def location + @hash['source'].to_s.split(':') end end end end