Class: Strawman::Transport

Inherits:
Object
  • Object
show all
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

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