Class: Gry::Congress

Inherits:
Object
  • Object
show all
Defined in:
lib/gry/congress.rb

Instance Method Summary collapse

Constructor Details

#initialize(max_count:, min_difference:, metrics_percentile:) ⇒ Congress

Returns a new instance of Congress.



3
4
5
6
7
# File 'lib/gry/congress.rb', line 3

def initialize(max_count:, min_difference:, metrics_percentile:)
  @max_count = max_count
  @min_difference = min_difference
  @metrics_percentile = metrics_percentile
end

Instance Method Details

#discuss(name, bill) ⇒ Law

Parameters:

  • name (String)

    cop name

  • bill (Hash{Hash => Array})

    rubocop results

    {config1 => [offenses],
    config2 => [offenses],
    config3 => [offenses],
    

    }

Returns:



17
18
19
20
# File 'lib/gry/congress.rb', line 17

def discuss(name, bill)
  letter = letter(name, bill)
  Law.new(name, bill, letter)
end