Sha256: b3e2da40f052b4d58e8dc293ffbb31e686769637749e8df6194204ad31f8b846

Contents?: true

Size: 822 Bytes

Versions: 17

Compression:

Stored size: 822 Bytes

Contents

module Inch
  module Language
    module JavaScript
      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.9.0.rc1 lib/inch/language/javascript/roles/base.rb
inch-0.8.0 lib/inch/language/javascript/roles/base.rb
inch-0.8.0.rc2 lib/inch/language/javascript/roles/base.rb
inch-0.8.0.rc1 lib/inch/language/javascript/roles/base.rb
inch-0.7.1 lib/inch/language/javascript/roles/base.rb
inch-0.7.0 lib/inch/language/javascript/roles/base.rb
inch-0.6.4 lib/inch/language/javascript/roles/base.rb
inch-0.6.3 lib/inch/language/javascript/roles/base.rb
inch-0.6.2 lib/inch/language/javascript/roles/base.rb
inch-0.6.1 lib/inch/language/javascript/roles/base.rb
inch-0.6.0 lib/inch/language/javascript/roles/base.rb
inch-0.6.0.rc6 lib/inch/language/javascript/roles/base.rb
inch-0.6.0.rc5 lib/inch/language/javascript/roles/base.rb
inch-0.6.0.rc4 lib/inch/language/javascript/roles/base.rb
inch-0.6.0.rc3 lib/inch/language/javascript/roles/base.rb
inch-0.6.0.rc2 lib/inch/language/javascript/roles/base.rb
inch-0.6.0.rc1 lib/inch/language/javascript/roles/base.rb