module Danger::Helpers::MessageGroupsArrayHelper

Constants

FakeArray

Public Instance Methods

counts() click to toggle source
# File lib/danger/helpers/message_groups_array_helper.rb, line 18
def counts
  return @counts if @counts

  @counts = { warnings: 0, errors: 0 }
  each do |message_group, counts|
    group_stats = message_group.stats
    @counts[:warnings] += group_stats[:warnings_count]
    @counts[:errors] += group_stats[:errors_count]
  end
  @counts
end
fake_errors_array() click to toggle source
# File lib/danger/helpers/message_groups_array_helper.rb, line 14
def fake_errors_array
  FakeArray.new(counts[:errors])
end
fake_warnings_array() click to toggle source
# File lib/danger/helpers/message_groups_array_helper.rb, line 10
def fake_warnings_array
  FakeArray.new(counts[:warnings])
end