Class: Lbspec::Request
- Inherits:
-
Object
- Object
- Lbspec::Request
- Defined in:
- lib/lbspec/request.rb
Overview
Lbspec::Request reqresent of request
Instance Method Summary collapse
-
#initialize(target, from = nil, options = {}) ⇒ Request
constructor
A new instance of Request.
- #send(prove = nil) ⇒ Object
Constructor Details
#initialize(target, from = nil, options = {}) ⇒ Request
Returns a new instance of Request.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/lbspec/request.rb', line 8 def initialize(target, from = nil, = {}) @addr, @port, @path = Lbspec::Util.split_addr_port_path(target) @from = from @protocol = [:protocol] ? [:protocol] : nil @application = [:application] ? [:application] : nil @path = [:path] if [:path] = [:options] ? [:options] : {} Util.log.debug("#{self.class} initialized #{inspect}") end |
Instance Method Details
#send(prove = nil) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/lbspec/request.rb', line 19 def send(prove = nil) if @application send_application(prove) else send_transport(prove) end end |