Sha256: d84fcbe582f388144305d361e13990b2016fb6b5c25c6fce134d6b536879545b

Contents?: true

Size: 818 Bytes

Versions: 17

Compression:

Stored size: 818 Bytes

Contents

module Inch
  module Language
    module Nodejs
      module Evaluation
        module Role
          # @abstract
          class Base < Inch::Evaluation::Role
            # Returns the type of the +object+ that is being evaluated.
            def object_type
              object.class.to_s.split('::').last.gsub(/Object$/, '').downcase
            end
          end

          # Missing is the base class for things that can be improved in the doc
          #
          class Missing < Base
            def score
              nil
            end

            # @return [Fixnum]
            #  a score that can be achieved by adding the missing thing
            #  mentioned by the role
            def potential_score
              @value.to_i
            end
          end
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
inch-0.5.10 lib/inch/language/nodejs/roles/base.rb
inch-0.5.9 lib/inch/language/nodejs/roles/base.rb
inch-0.5.8 lib/inch/language/nodejs/roles/base.rb
inch-0.5.7 lib/inch/language/nodejs/roles/base.rb
inch-0.5.6 lib/inch/language/nodejs/roles/base.rb
inch-0.5.5 lib/inch/language/nodejs/roles/base.rb
inch-0.5.4 lib/inch/language/nodejs/roles/base.rb
inch-0.5.3 lib/inch/language/nodejs/roles/base.rb
inch-0.5.2 lib/inch/language/nodejs/roles/base.rb
inch-0.5.1 lib/inch/language/nodejs/roles/base.rb
inch-0.5.0 lib/inch/language/nodejs/roles/base.rb
inch-0.5.0.rc11 lib/inch/language/nodejs/roles/base.rb
inch-0.5.0.rc10 lib/inch/language/nodejs/roles/base.rb
inch-0.5.0.rc9 lib/inch/language/nodejs/roles/base.rb
inch-0.5.0.rc8 lib/inch/language/nodejs/roles/base.rb
inch-0.5.0.rc7 lib/inch/language/nodejs/roles/base.rb
inch-0.5.0.rc6 lib/inch/language/nodejs/roles/base.rb