Class: MethodMatcher
- Includes:
- StringSymbolAdapter
- 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
Methods included from StringSymbolAdapter
Constructor Details
#initialize(method, include_super = true) ⇒ MethodMatcher
Returns a new instance of MethodMatcher.
6 7 8 9 |
# File 'lib/extensions/mspec/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
11 12 13 |
# File 'lib/extensions/mspec/mspec/matchers/method.rb', line 11 def matches?(mod) raise Exception, "define #matches? in the subclass" end |