Sha256: 4ed230bd51a6c9a15f07f76f6fa8989cd760fad746093df3231af9ae8e63d458

Contents?: true

Size: 1.14 KB

Versions: 2

Compression:

Stored size: 1.14 KB

Contents

require "inch/evaluation/proxy"

module Inch
  module API
    module Options
      class Suggest < Base
        # This module is included here and in Command::Options::Suggest
        # to ensure the same default values for the command-line and library
        # interface
        module DefaultAttributeValues
          DEFAULT_OBJECT_COUNT        = 20
          DEFAULT_FILE_COUNT          = 5
          DEFAULT_PROPER_GRADES       = [:A, :B]
          DEFAULT_GRADES_TO_DISPLAY   = [:B, :C, :U]
          DEFAULT_GRADE_WEIGHTS       = [0.2, 0.4, 0.4]
          DEFAULT_OBJECT_MIN_PRIORITY = 0
          DEFAULT_OBJECT_MAX_SCORE    = ::Inch::Evaluation::Proxy::MAX_SCORE
        end

        include DefaultAttributeValues

        attribute :object_count, DEFAULT_OBJECT_COUNT
        attribute :file_count, DEFAULT_FILE_COUNT
        attribute :proper_grades, DEFAULT_PROPER_GRADES
        attribute :grades_to_display, DEFAULT_GRADES_TO_DISPLAY
        attribute :grade_weights, DEFAULT_GRADE_WEIGHTS
        attribute :object_min_priority, DEFAULT_OBJECT_MIN_PRIORITY
        attribute :object_max_score, DEFAULT_OBJECT_MAX_SCORE
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
inch-0.5.0.rc5 lib/inch/api/options/suggest.rb
inch-0.5.0.rc4 lib/inch/api/options/suggest.rb