Module: Danger::Helpers::MessageGroupsArrayHelper
- Defined in:
- lib/danger/helpers/message_groups_array_helper.rb
Defined Under Namespace
Classes: FakeArray
Instance Method Summary collapse
Instance Method Details
#counts ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/danger/helpers/message_groups_array_helper.rb', line 20 def counts return @counts if @counts @counts = { warnings: 0, errors: 0 } each do |, counts| group_stats = .stats @counts[:warnings] += group_stats[:warnings_count] @counts[:errors] += group_stats[:errors_count] end @counts end |
#fake_errors_array ⇒ Object
16 17 18 |
# File 'lib/danger/helpers/message_groups_array_helper.rb', line 16 def fake_errors_array FakeArray.new(counts[:errors]) end |
#fake_warnings_array ⇒ Object
12 13 14 |
# File 'lib/danger/helpers/message_groups_array_helper.rb', line 12 def fake_warnings_array FakeArray.new(counts[:warnings]) end |