Class: RequestRequest
Instance Attribute Summary collapse
- 
  
    
      #data  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute data. 
- 
  
    
      #method  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute method. 
- 
  
    
      #path  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute path. 
- 
  
    
      #protocol  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute protocol. 
- 
  
    
      #uri  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute uri. 
Instance Method Summary collapse
- 
  
    
      #initialize(firstline)  ⇒ RequestRequest 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of RequestRequest. 
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(firstline) ⇒ RequestRequest
Returns a new instance of RequestRequest.
| 544 545 546 547 548 549 550 551 552 553 554 | # File 'lib/rwd/net.rb', line 544 def initialize(firstline) @method, @uri, @protocol = firstline.split(/ /) @path, @data = @uri.split(/\?/) @data = "" if @data.nil? # TODO # i = @path.index(/%[[:digit:]]{2}/) # while not i.nil? # @path = @path[0..(i-1)] + @path[(i+1)..(i+2)].unpack('H2').shift.to_i.chr + @path[(i+3)..-1] # i = @path.index(/%[[:digit:]]{2}/) # end end | 
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
| 541 542 543 | # File 'lib/rwd/net.rb', line 541 def data @data end | 
#method ⇒ Object (readonly)
Returns the value of attribute method.
| 538 539 540 | # File 'lib/rwd/net.rb', line 538 def method @method end | 
#path ⇒ Object (readonly)
Returns the value of attribute path.
| 540 541 542 | # File 'lib/rwd/net.rb', line 540 def path @path end | 
#protocol ⇒ Object (readonly)
Returns the value of attribute protocol.
| 542 543 544 | # File 'lib/rwd/net.rb', line 542 def protocol @protocol end | 
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
| 539 540 541 | # File 'lib/rwd/net.rb', line 539 def uri @uri end |