Sha256: 7fb8506e25d5089d2d7a2d18bab2801ed6eaa146132984fc5b7c9493f7447cc1

Contents?: true

Size: 309 Bytes

Versions: 14

Compression:

Stored size: 309 Bytes

Contents

require 'forwardable'

module Fasterer
  class OffenseCollector
    extend Forwardable

    def initialize
      @offenses = []
    end

    def [](offense_name)
      @offenses.select { |offense| offense.name == offense_name }
    end

    def_delegators :@offenses, :push, :any?, :each, :group_by
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fasterer-0.2.0 lib/fasterer/offense_collector.rb
fasterer-0.1.12 lib/fasterer/offense_collector.rb
fasterer-0.1.11 lib/fasterer/offense_collector.rb
fasterer-0.1.10 lib/fasterer/offense_collector.rb
fasterer-0.1.9 lib/fasterer/offense_collector.rb
fasterer-0.1.8 lib/fasterer/offense_collector.rb
fasterer-0.1.7 lib/fasterer/offense_collector.rb
fasterer-0.1.6 lib/fasterer/offense_collector.rb
fasterer-0.1.5 lib/fasterer/offense_collector.rb
fasterer-0.1.4 lib/fasterer/offense_collector.rb
fasterer-0.1.3 lib/fasterer/offense_collector.rb
fasterer-0.1.2 lib/fasterer/offense_collector.rb
fasterer-0.1.1 lib/fasterer/offense_collector.rb
fasterer-0.1.0 lib/fasterer/offense_collector.rb