Class: DR::URIWrapper
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- DR::URIWrapper
show all
- Includes:
- URIlikeWrapper
- Defined in:
- lib/dr/base/uri.rb
Direct Known Subclasses
Ssh
Defined Under Namespace
Classes: Ssh
Class Method Summary
collapse
Instance Method Summary
collapse
#reverse_merge, #soft_merge, #to_h, #to_json, #to_public
Constructor Details
recall that '//user@server' is an uri while 'user@server' is just a path
206
207
208
209
|
# File 'lib/dr/base/uri.rb', line 206
def initialize(uri)
super
self.uri = uri
end
|
Class Method Details
.get_uri_object(uri) ⇒ Object
173
174
175
176
|
# File 'lib/dr/base/uri.rb', line 173
def self.get_uri_object(uri)
uri = self.parse(uri.to_s) unless uri.is_a?(URI)
uri
end
|
.parse(s) ⇒ Object
169
170
171
|
# File 'lib/dr/base/uri.rb', line 169
def self.parse(s)
new(URI.parse(s))
end
|
Instance Method Details
#uri ⇒ Object
159
160
161
|
# File 'lib/dr/base/uri.rb', line 159
def uri
__getobj__
end
|
#uri=(uri) ⇒ Object
163
164
165
|
# File 'lib/dr/base/uri.rb', line 163
def uri=(uri)
__setobj__(transform_uri(uri))
end
|