Class: Greenroom::CLI::Judge::Evaluation
- Inherits:
-
Object
- Object
- Greenroom::CLI::Judge::Evaluation
- Defined in:
- lib/greenroom/cli/judge.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(events, config, repository) ⇒ Evaluation
constructor
A new instance of Evaluation.
Constructor Details
#initialize(events, config, repository) ⇒ Evaluation
Returns a new instance of Evaluation.
88 89 90 91 92 |
# File 'lib/greenroom/cli/judge.rb', line 88 def initialize(events, config, repository) @events = events @config = config @repository = File.(repository) end |
Instance Method Details
#call ⇒ Object
94 95 96 97 98 99 100 |
# File 'lib/greenroom/cli/judge.rb', line 94 def call valid, errors = readable_events verdicts = valid.group_by { |event| event.fetch("experiment") }.map do |name, entries| evaluate(name, deduplicate(entries)) end [verdicts, errors] end |