Class: MethodMatcher
Direct Known Subclasses
HaveInstanceMethodMatcher, HaveMethodMatcher, HavePrivateInstanceMethodMatcher
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.
4 5 6 7 8 |
# File 'lib/mspec/matchers/method.rb', line 4 def initialize(method, include_super=true) @include_super = include_super version = SpecVersion.new(RUBY_VERSION) <=> "1.9" @method = version < 0 ? method.to_s : method end |
Instance Method Details
#matches?(mod) ⇒ Boolean
10 11 12 |
# File 'lib/mspec/matchers/method.rb', line 10 def matches?(mod) raise Exception, "define #matches? in the subclass" end |