Class: HttpObjects::Parameters::Uri

Inherits:
BasicRules::Base show all
Defined in:
lib/http_objects/parameters/uri.rb

Overview

3.2 Uniform Resource Identifiers Examples

http://abc.com:80/~smith/home.html
/~smith/home.html

Instance Attribute Summary

Attributes inherited from BasicRules::Base

#raw, #value

Class Method Summary collapse

Methods inherited from BasicRules::Base

#initialize

Constructor Details

This class inherits a constructor from HttpObjects::Parameters::BasicRules::Base

Class Method Details

.parse(value) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/http_objects/parameters/uri.rb', line 11

def self.parse(value)
  raw = value
  if !(value.nil? || value == "")
    value = URI.parse(value.to_s)
  end
  self.new(raw, value)
end