Class: Evoke::HTTMockParty::Router
- Inherits:
-
Object
- Object
- Evoke::HTTMockParty::Router
- Defined in:
- lib/evoke_client/mock.rb
Instance Method Summary collapse
- #dispatch(*args) ⇒ Object
-
#initialize ⇒ Router
constructor
A new instance of Router.
- #maps(*args) ⇒ Object
Constructor Details
#initialize ⇒ Router
Returns a new instance of Router.
39 |
# File 'lib/evoke_client/mock.rb', line 39 def initialize; @responder_routes = {}; end |
Instance Method Details
#dispatch(*args) ⇒ Object
41 42 43 |
# File 'lib/evoke_client/mock.rb', line 41 def dispatch(*args) (@responder_routes[args.inspect] || NilResponder).process end |
#maps(*args) ⇒ Object
40 |
# File 'lib/evoke_client/mock.rb', line 40 def maps(*args) @responder_routes[args.inspect] = Responder.new; end |