Class Roodi::Checks::MethodNameCheck
In: lib/roodi/checks/method_name_check.rb
Parent: Roodi::Checks::NameCheck

Checks a method name to make sure it matches the specified pattern.

Keeping to a consistent nameing convention makes your code easier to read.

Methods

find_name   new  

Constants

DEFAULT_PATTERN = /^[_a-z<>=\[|+-\/\*`]+[_a-z0-9_<>=~@\[\]]*[=!\?]?$/

Public Class methods

[Source]

# File lib/roodi/checks/method_name_check.rb, line 11
      def initialize(options = {})
        pattern = options['pattern'] || DEFAULT_PATTERN
        super([:defn], pattern, 'Method')
      end

Public Instance methods

[Source]

# File lib/roodi/checks/method_name_check.rb, line 16
      def find_name(node)
        node[1]
      end

[Validate]