Sha256: 13f30a3c0a42043717d96b949357f2e755e105d738c3a0b5aca8d61c23562c9a

Contents?: true

Size: 464 Bytes

Versions: 12

Compression:

Stored size: 464 Bytes

Contents

require 'simplabs/excellent/checks/base'

module Simplabs

  module Excellent

    module Checks

      class NameCheck < Base #:nodoc:

        def initialize(interesting_nodes, pattern)
          super()
          @interesting_nodes = interesting_nodes
          @pattern           = pattern
        end

        def evaluate(context)
          add_warning(*warning_args(context)) unless context.name.to_s =~ @pattern
        end

      end

    end

  end

end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
simplabs-excellent-1.2.1 lib/simplabs/excellent/checks/name_check.rb
simplabs-excellent-1.2.2 lib/simplabs/excellent/checks/name_check.rb
simplabs-excellent-1.3.0 lib/simplabs/excellent/checks/name_check.rb
simplabs-excellent-1.3.1 lib/simplabs/excellent/checks/name_check.rb
simplabs-excellent-1.4.0 lib/simplabs/excellent/checks/name_check.rb
simplabs-excellent-1.4.1 lib/simplabs/excellent/checks/name_check.rb
simplabs-excellent-1.4.2 lib/simplabs/excellent/checks/name_check.rb
simplabs-excellent-1.5.0 lib/simplabs/excellent/checks/name_check.rb
simplabs-excellent-1.5.1 lib/simplabs/excellent/checks/name_check.rb
simplabs-excellent-1.5.2 lib/simplabs/excellent/checks/name_check.rb
simplabs-excellent-1.5.3 lib/simplabs/excellent/checks/name_check.rb
excellent-1.5.4 lib/simplabs/excellent/checks/name_check.rb