Class: MethodMatcher
- Defined in:
- lib/extensions/mspec/mspec/matchers/method.rb
Direct Known Subclasses
HaveInstanceMethodMatcher, HaveMethodMatcher, HavePrivateInstanceMethodMatcher, HavePrivateMethodMatcher, HaveProtectedInstanceMethodMatcher, HavePublicInstanceMethodMatcher, HaveSingletonMethodMatcher
Instance Method Summary collapse
-
#initialize(method, include_super = true) ⇒ MethodMatcher
constructor
A new instance of MethodMatcher.
- #matches?(mod) ⇒ Boolean
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
7 8 9 |
# File 'lib/extensions/mspec/mspec/matchers/method.rb', line 7 def matches?(mod) raise Exception, "define #matches? in the subclass" end |