Class: MethodMatcher

Inherits:
Object show all
Includes:
StringSymbolAdapter
Defined in:
lib/mspec/matchers/method.rb

Instance Method Summary collapse

Methods included from StringSymbolAdapter

#convert_name

Constructor Details

#initialize(method, include_super = true) ⇒ MethodMatcher

Returns a new instance of MethodMatcher.



6
7
8
9
# File 'lib/mspec/matchers/method.rb', line 6

def initialize(method, include_super=true)
  @include_super = include_super
  @method = convert_name method
end

Instance Method Details

#matches?(mod) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (Exception)


11
12
13
# File 'lib/mspec/matchers/method.rb', line 11

def matches?(mod)
  raise Exception, "define #matches? in the subclass"
end