Class: Strawman::Transport
- Inherits:
-
Object
- Object
- Strawman::Transport
- Defined in:
- lib/strawman/transport.rb
Overview
Abstract class proxy used for either EventMachine::HttpRequests in production or EventMachine::MockHttpRequest for testing.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Transport
constructor
A new instance of Transport.
- #method_missing(method, *args) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Transport
Returns a new instance of Transport.
7 8 9 |
# File 'lib/strawman/transport.rb', line 7 def initialize(*args) @request = EventMachine::HttpRequest.new(*args) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
10 11 12 |
# File 'lib/strawman/transport.rb', line 10 def method_missing(method, *args) @request.send(method, *args) end |