Sha256: 81377060fdc01952c82a6a04b1f6d389238f39c0745c3e3ff5695b19df6ad7c4

Contents?: true

Size: 1.3 KB

Versions: 5

Compression:

Stored size: 1.3 KB

Contents

module Inch
  module Evaluation
    module Role
      module Namespace
        class WithChildren < Base
          # This role doesnot assign a score.
          def score
            0
          end

          # This role sets a max_score.
          def max_score
            # @value.to_f
          end
        end
        class WithManyChildren < Base
          # +priority
          def priority
            +1
          end
        end
        class WithManyAttributes < Base
          # +priority
          def priority
            +1
          end
        end

        class WithoutChildren < Base
        end
        class WithoutMethods < Base
          # --priority
          def priority
            -2
          end
        end
        # A 'pure' namespace has only namespaces as children
        class Pure < Base
          # --priority
          def priority
            -2
          end
        end
        # A 'core' namespace is a class or module that is part of the Ruby
        # core. It might appear in the object tree when monkey-patching
        # functionality.
        # But just because we patch Hash does not mean we need to document
        # the Hash class itself.
        class Core < Base
          # --priority
          def priority
            -7
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
inch-0.1.4 lib/inch/evaluation/role/namespace.rb
inch-0.1.3 lib/inch/evaluation/role/namespace.rb
inch-0.1.2 lib/inch/evaluation/role/namespace.rb
inch-0.1.1 lib/inch/evaluation/role/namespace.rb
inch-0.1.0 lib/inch/evaluation/role/namespace.rb