Class: RIO::RL::Base
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(*args) ⇒ Base
Returns a new instance of Base.
53
54
55
56
|
# File 'lib/rio/rl/base.rb', line 53
def initialize(*args)
@fs = openfs_
end
|
Instance Attribute Details
Returns the value of attribute fs.
52
53
54
|
# File 'lib/rio/rl/base.rb', line 52
def fs
@fs
end
|
Class Method Details
.is_riorl?(s) ⇒ Boolean
74
75
76
|
# File 'lib/rio/rl/base.rb', line 74
def self.is_riorl?(s)
s[0...SCHC.length] == SCHC
end
|
.parse(*a) ⇒ Object
78
79
80
81
|
# File 'lib/rio/rl/base.rb', line 78
def self.parse(*a)
parms = splitrl(a.shift) || []
new(*(parms+a))
end
|
.split_riorl(s) ⇒ Object
67
68
69
70
71
72
|
# File 'lib/rio/rl/base.rb', line 67
def self.split_riorl(s)
body = s[SCHC.length...s.length]
m = SPLIT_RIORL_RE.match(body)
return [] if m.nil?
return m[1],m[3],m[0]
end
|
.subscheme(s) ⇒ Object
63
64
65
|
# File 'lib/rio/rl/base.rb', line 63
def self.subscheme(s)
/^rio:([^:]+):/.match(s)[1]
end
|
Instance Method Details
#==(other) ⇒ Object
88
|
# File 'lib/rio/rl/base.rb', line 88
def ==(other) self.to_s == other.to_s end
|
#===(other) ⇒ Object
89
|
# File 'lib/rio/rl/base.rb', line 89
def ===(other) self == other end
|
#=~(other) ⇒ Object
90
|
# File 'lib/rio/rl/base.rb', line 90
def =~(other) other =~ self.to_str end
|
#callstr(func, *args) ⇒ Object
113
114
115
|
# File 'lib/rio/rl/base.rb', line 113
def callstr(func,*args)
self.class.to_s+'['+self.to_s+']'+'.'+func.to_s+'('+args.join(',')+')'
end
|
99
100
101
102
|
# File 'lib/rio/rl/base.rb', line 99
def close()
nil
end
|
#escape(pth, esc = RL::ESCAPE) ⇒ Object
106
107
108
|
# File 'lib/rio/rl/base.rb', line 106
def escape(pth,esc=RL::ESCAPE)
RL.escape(pth,esc)
end
|
#fs2url(pth) ⇒ Object
104
|
# File 'lib/rio/rl/base.rb', line 104
def fs2url(pth) RL.fs2url(pth) end
|
93
|
# File 'lib/rio/rl/base.rb', line 93
def fspath() nil end
|
#initialize_copy(cp) ⇒ Object
57
58
59
|
# File 'lib/rio/rl/base.rb', line 57
def initialize_copy(cp)
super
end
|
91
|
# File 'lib/rio/rl/base.rb', line 91
def length() self.to_s.length end
|
60
61
62
|
# File 'lib/rio/rl/base.rb', line 60
def openfs_()
nil
end
|
94
|
# File 'lib/rio/rl/base.rb', line 94
def path() nil end
|
83
|
# File 'lib/rio/rl/base.rb', line 83
def rl() SCHC+self.url end
|
96
|
# File 'lib/rio/rl/base.rb', line 96
def to_rl() self.rl end
|
def riorl() SCHC+self.url end
87
|
# File 'lib/rio/rl/base.rb', line 87
def to_s() self.fspath || '' end
|
#unescape(pth) ⇒ Object
109
110
111
|
# File 'lib/rio/rl/base.rb', line 109
def unescape(pth)
RL.unescape(pth)
end
|
98
|
# File 'lib/rio/rl/base.rb', line 98
def url() self.scheme+SUBSEPAR+self.opaque end
|
#url2fs(pth) ⇒ Object
105
|
# File 'lib/rio/rl/base.rb', line 105
def url2fs(pth) RL.url2fs(pth) end
|