Class: DR::URI::Wrapper
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- DR::URI::Wrapper
show all
- Includes:
- URIHelpers
- Defined in:
- lib/dr/base/uri.rb
Direct Known Subclasses
Ssh
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from URIHelpers
#reverse_merge, #soft_merge, #strip_user, #to_h, #to_json, #to_public
Constructor Details
#initialize(uri) ⇒ Wrapper
recall that '//user@server' is an uri while 'user@server' is just a path
201
202
203
204
|
# File 'lib/dr/base/uri.rb', line 201
def initialize(uri)
super
self.uri = uri
end
|
Class Method Details
.get_uri_object(uri) ⇒ Object
168
169
170
171
|
# File 'lib/dr/base/uri.rb', line 168
def self.get_uri_object(uri)
uri = self.parse(uri.to_s) unless uri.is_a?(::URI)
uri
end
|
.parse(s) ⇒ Object
164
165
166
|
# File 'lib/dr/base/uri.rb', line 164
def self.parse(s)
new(::URI.parse(s))
end
|
Instance Method Details
#uri ⇒ Object
154
155
156
|
# File 'lib/dr/base/uri.rb', line 154
def uri
__getobj__
end
|
#uri=(uri) ⇒ Object
158
159
160
|
# File 'lib/dr/base/uri.rb', line 158
def uri=(uri)
__setobj__(transform_uri(uri))
end
|