Class: WebMock::MethodPattern
- Inherits:
-
Object
- Object
- WebMock::MethodPattern
- Defined in:
- lib/webmock/request_pattern.rb
Instance Method Summary collapse
-
#initialize(pattern) ⇒ MethodPattern
constructor
A new instance of MethodPattern.
- #matches?(method) ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(pattern) ⇒ MethodPattern
Returns a new instance of MethodPattern.
94 95 96 |
# File 'lib/webmock/request_pattern.rb', line 94 def initialize(pattern) @pattern = pattern end |
Instance Method Details
#matches?(method) ⇒ Boolean
98 99 100 |
# File 'lib/webmock/request_pattern.rb', line 98 def matches?(method) @pattern == method || @pattern == :any end |
#to_s ⇒ Object
102 103 104 |
# File 'lib/webmock/request_pattern.rb', line 102 def to_s @pattern.to_s end |