Class: Alt::URI::HTTP
Instance Attribute Summary
Attributes inherited from Base
#ext, #parts
Instance Method Summary
collapse
Methods included from Builders
create, create_, parse, parse_
#[], #[]=, #abs, #absolute?, #join, #rel, #relative?, #route_from, #route_to
Methods inherited from Base
#==, #length, #sub
Methods included from RIO::Fwd
#fwd, #fwd_reader, #fwd_readers, #fwd_writer, #fwd_writers
#basename, #basename=, #dirname, #dirname=, #extname, #extname=, #filename, #filename=
Constructor Details
#initialize(parts = nil) ⇒ HTTP
Returns a new instance of HTTP.
277
278
279
280
281
282
|
# File 'lib/rio/alturi.rb', line 277
def initialize(parts=nil)
prts = parts || Alt::URI::Gen::URIParts.new
prts.scheme ||= 'http'
prts.host ||= ""
super(prts)
end
|
Instance Method Details
#fspath=(val) ⇒ Object
302
|
# File 'lib/rio/alturi.rb', line 302
def fspath=(val) path = val end
|
#host=(val) ⇒ Object
311
312
313
|
# File 'lib/rio/alturi.rb', line 311
def host=(val)
parts.host = (val || "")
end
|
#initialize_copy(other) ⇒ Object
283
284
285
|
# File 'lib/rio/alturi.rb', line 283
def initialize_copy(other)
super
end
|
294
295
296
|
# File 'lib/rio/alturi.rb', line 294
def netpath
parts.path
end
|
#netpath=(val) ⇒ Object
298
299
300
|
# File 'lib/rio/alturi.rb', line 298
def netpath=(val)
parts.path = val
end
|
#normalize ⇒ Object
304
305
306
307
308
309
|
# File 'lib/rio/alturi.rb', line 304
def normalize
if self.port == '80'
self.port = nil
end
super
end
|
#scheme=(val) ⇒ Object
315
316
317
|
# File 'lib/rio/alturi.rb', line 315
def scheme=(val)
parts.scheme = (val || 'http')
end
|