Sha256: 17827807ed0f03d930b6bd3465833442dae8d9b359171dfeec51b0e26c0b7a46

Contents?: true

Size: 430 Bytes

Versions: 1

Compression:

Stored size: 430 Bytes

Contents

module WarningSigns
  module CallerLocationHelper
    def caller_location_start
      caller_locations.find_index do |location|
        !ignore_line(location.to_s)
      end || 0
    end

    def ignore_line(line)
      line.include?("<internal:") ||
        line.include?("warning_signs/lib") ||
        line.include?("warning_signs/spec") ||
        line.include?("rubygems") ||
        line.include?("/gems")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
warning_signs-0.5.0 lib/warning_signs/caller_location_helper.rb