Class: MethodMatcher

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

Instance Method Summary collapse

Constructor Details

#initialize(method, include_super = true) ⇒ MethodMatcher

Returns a new instance of MethodMatcher.



2
3
4
5
# File 'lib/extensions/mspec/mspec/matchers/method.rb', line 2

def initialize(method, include_super=true)
  @include_super = include_super
  @method = method.to_sym
end

Instance Method Details

#matches?(mod) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (Exception)


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

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