Class: ApiSim::SmartRequest
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- ApiSim::SmartRequest
- Defined in:
- lib/api_sim/matchers/dynamic_request_matcher.rb
Instance Method Summary collapse
- #[](requested_part) ⇒ Object
-
#initialize(obj, matcher) ⇒ SmartRequest
constructor
A new instance of SmartRequest.
Constructor Details
#initialize(obj, matcher) ⇒ SmartRequest
Returns a new instance of SmartRequest.
40 41 42 43 |
# File 'lib/api_sim/matchers/dynamic_request_matcher.rb', line 40 def initialize(obj, matcher) super(obj) @matcher = matcher end |
Instance Method Details
#[](requested_part) ⇒ Object
45 46 47 |
# File 'lib/api_sim/matchers/dynamic_request_matcher.rb', line 45 def [](requested_part) @matcher.route.match(path)[requested_part] end |