Class: RIO::FTP::RL
- Inherits:
-
RL::URIBase
- Object
- RL::Base
- RL::WithPath
- RL::URIBase
- RIO::FTP::RL
- Defined in:
- lib/rio/scheme/ftp.rb
Constant Summary
Constants inherited from RL::URIBase
RL::URIBase::HOST, RL::URIBase::SCHEME
Constants inherited from RL::WithPath
RL::WithPath::HOST, RL::WithPath::SCHEME
Instance Attribute Summary
Attributes inherited from RL::URIBase
Attributes inherited from RL::Base
Class Method Summary collapse
Instance Method Summary collapse
- #_sup_args(arg0, *args) ⇒ Object
- #dir_rl ⇒ Object
- #file_rl ⇒ Object
-
#initialize(arg0, *args) ⇒ RL
constructor
A new instance of RL.
-
#join(*args) ⇒ Object
end.
- #open(*args) ⇒ Object
- #openfs_ ⇒ Object
Methods inherited from RL::URIBase
#_get_base_from_arg, #_get_opts_from_args, #absolute?, #arg0_info_, #base, #base=, #host, #host=, #init_from_args_, #initialize_copy, #opaque, #path, #path=, #pathroot, #scheme, #to_s, #url, #urlpath, #urlpath=, #urlroot
Methods inherited from RL::WithPath
#_build, #_parts, #_uri, #abs, #base, #basename, #build_arg0_, #dirname, #filename, #fspath, #fspath=, #fspath_no_slash, #host, #host=, #is_root?, #merge, #opaque, #path, #path=, #path_no_slash, #pathdepth, #pathroot, #route_from, #route_to, #scheme, #split, #uri, #uri_from_string_, #urlpath, #urlpath=
Methods included from Error::NotImplemented
Methods inherited from RL::Base
#==, #===, #=~, #callstr, #close, #escape, #fs2url, #fspath, #initialize_copy, is_riorl?, #length, parse, #path, #rl, split_riorl, subscheme, #to_rl, #to_s, #unescape, #url, #url2fs
Constructor Details
#initialize(arg0, *args) ⇒ RL
Returns a new instance of RL.
52 53 54 55 56 57 |
# File 'lib/rio/scheme/ftp.rb', line 52 def initialize(arg0,*args) #p callstr('initialize',arg0,*args) super(*_sup_args(arg0,*args)) @ftype = nil @names = nil end |
Class Method Details
.splitrl(s) ⇒ Object
98 99 100 101 102 103 |
# File 'lib/rio/scheme/ftp.rb', line 98 def self.splitrl(s) #p "splitrl(#{s})" sub,opq,whole = split_riorl(s) #p sub,opq,whole [whole] end |
Instance Method Details
#_sup_args(arg0, *args) ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/rio/scheme/ftp.rb', line 58 def _sup_args(arg0,*args) if arg0 == 'ftp:' hn = args.shift || 'localhost' us = args.shift pw = args.shift pt = args.shift || '' ph = args.shift || '/' tc = args.shift || '' u = URI::FTP.new2(us,pw,hn,pt,ph,tc) return [u] else return [arg0] + args end end |
#dir_rl ⇒ Object
114 115 116 |
# File 'lib/rio/scheme/ftp.rb', line 114 def dir_rl() self end |
#file_rl ⇒ Object
111 112 113 |
# File 'lib/rio/scheme/ftp.rb', line 111 def file_rl() RIO::FTP::Stream::RL.new(self.uri) end |
#join(*args) ⇒ Object
end
92 93 94 95 |
# File 'lib/rio/scheme/ftp.rb', line 92 def join(*args) return self if args.empty? join_(args.map{ |arg| RIO::RL.fs2url(arg.to_s)}) end |