Sha256: 76e950713fc01c91511fa7827a583d363e6ba90fdd9df71f0c1db8bf87f9b5eb

Contents?: true

Size: 1.23 KB

Versions: 36

Compression:

Stored size: 1.23 KB

Contents

require 'inch/evaluation/proxy/base'

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::Base::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

      def self.Suggest(options_or_hash)
        Suggest.new(options_or_hash)
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
inch-0.5.0.rc3 lib/inch/api/options/suggest.rb
inch-0.5.0.rc2 lib/inch/api/options/suggest.rb
inch-0.5.0.rc1 lib/inch/api/options/suggest.rb
inch-0.4.6 lib/inch/api/options/suggest.rb
inch-0.4.5 lib/inch/api/options/suggest.rb
inch-0.4.4 lib/inch/api/options/suggest.rb
inch-0.4.4.rc4 lib/inch/api/options/suggest.rb
inch-0.4.4.rc3 lib/inch/api/options/suggest.rb
inch-0.4.4.rc2 lib/inch/api/options/suggest.rb
inch-0.4.4.rc1 lib/inch/api/options/suggest.rb
inch-0.4.3 lib/inch/api/options/suggest.rb
inch-0.4.3.rc2 lib/inch/api/options/suggest.rb
inch-0.4.3.rc1 lib/inch/api/options/suggest.rb
inch-0.4.2 lib/inch/api/options/suggest.rb
inch-0.4.1 lib/inch/api/options/suggest.rb
inch-0.4.0 lib/inch/api/options/suggest.rb
inch-0.4.0.rc3 lib/inch/api/options/suggest.rb
inch-0.4.0.rc2 lib/inch/api/options/suggest.rb
inch-0.4.0.rc1 lib/inch/api/options/suggest.rb
inch-0.3.4.rc1 lib/inch/api/options/suggest.rb