Class: WarningsLogger::Partitioner

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/warnings_logger/partitioner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration:, reader:) ⇒ Partitioner



9
10
11
12
# File 'lib/warnings_logger/partitioner.rb', line 9

def initialize(configuration:, reader:)
  @configuration = configuration
  @reader = reader
end

Instance Attribute Details

#irrelevant_warning_groupsObject (readonly)

Returns the value of attribute irrelevant_warning_groups.



7
8
9
# File 'lib/warnings_logger/partitioner.rb', line 7

def irrelevant_warning_groups
  @irrelevant_warning_groups
end

#relevant_warning_groupsObject (readonly)

Returns the value of attribute relevant_warning_groups.



7
8
9
# File 'lib/warnings_logger/partitioner.rb', line 7

def relevant_warning_groups
  @relevant_warning_groups
end

Instance Method Details

#partitionObject



14
15
16
17
# File 'lib/warnings_logger/partitioner.rb', line 14

def partition
  @relevant_warning_groups, @irrelevant_warning_groups =
    warning_groups.partition { |group| relevant_warnings?(group) }
end