Sha256: e59814e599cee078647271f32381007207f6ccc665b8293f2672d1c7407c388f

Contents?: true

Size: 1.25 KB

Versions: 5

Compression:

Stored size: 1.25 KB

Contents

module Inch
  module Evaluation
    module Role
      # Roles assigned to class variables
      module ClassVariable
        class WithDoc < Object::WithDoc
          applicable_if :has_doc?
        end
        class WithoutDoc < Object::WithoutDoc
          applicable_unless :has_doc?
        end

        class TaggedAsNodoc < Object::TaggedAsNodoc
          applicable_if :nodoc?
        end
        class InRoot < Object::InRoot
          applicable_if :in_root?
        end

        class Public < Object::Public
          applicable_if :public?

          def priority
            -1
          end
        end
        class Private < Object::Private
          applicable_if :private?

          def priority
            -3
          end
        end

        class WithCodeExample < Object::WithCodeExample
          applicable_if do |o|
            o.has_code_example? && !o.has_multiple_code_examples?
          end
        end

        class WithMultipleCodeExamples < Object::WithMultipleCodeExamples
          applicable_if :has_multiple_code_examples?
        end

        class WithoutCodeExample < Object::WithoutCodeExample
          applicable_unless :has_code_example?

          def suggestion
            nil
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
inch-0.4.10 lib/inch/evaluation/role/class_variable.rb
inch-0.4.9 lib/inch/evaluation/role/class_variable.rb
inch-0.4.8 lib/inch/evaluation/role/class_variable.rb
inch-0.4.7 lib/inch/evaluation/role/class_variable.rb
inch-0.5.0.rc3 lib/inch/evaluation/role/class_variable.rb