Sha256: 8774a089e41f10a2d910ca7a524cbe0108c7d0fd3bda5d6b95f43cdf0444bd78
Contents?: true
Size: 738 Bytes
Versions: 13
Compression:
Stored size: 738 Bytes
Contents
require 'forwardable' class WarningsSpy class Partitioner extend Forwardable attr_reader :relevant_warning_groups, :irrelevant_warning_groups def initialize(reader, filesystem) @reader = reader @search_text = filesystem.project_dir end def partition @relevant_warning_groups, @irrelevant_warning_groups = warning_groups.partition { |group| relevant_warnings?(group) } end protected attr_reader :reader, :search_text private def_delegators :reader, :warning_groups def relevant_warnings?(group) first_line = group[0] first_line.start_with?("#{project_root}/lib") end def project_root File.expand_path('../../..') end end end
Version data entries
13 entries across 13 versions & 3 rubygems