Class: Alt::URI::Base
Instance Attribute Summary collapse
-
#ext ⇒ Object
Returns the value of attribute ext.
-
#parts ⇒ Object
readonly
Returns the value of attribute parts.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(parts) ⇒ Base
constructor
A new instance of Base.
- #initialize_copy(other) ⇒ Object
- #length ⇒ Object
- #normalize ⇒ Object
- #sub(re, arg) ⇒ Object
Methods included from RIO::Fwd
fwd, fwd_reader, fwd_readers, fwd_writer, fwd_writers
Methods included from Ops::PathParts
#basename, #basename=, #dirname, #dirname=, #extname, #extname=, #filename, #filename=, #netpath
Constructor Details
#initialize(parts) ⇒ Base
Returns a new instance of Base.
133 134 135 136 |
# File 'lib/rio/alturi.rb', line 133 def initialize(parts) @parts = parts @ext = nil end |
Instance Attribute Details
#ext ⇒ Object
Returns the value of attribute ext.
132 133 134 |
# File 'lib/rio/alturi.rb', line 132 def ext @ext end |
#parts ⇒ Object (readonly)
Returns the value of attribute parts.
131 132 133 |
# File 'lib/rio/alturi.rb', line 131 def parts @parts end |
Instance Method Details
#==(other) ⇒ Object
142 143 144 |
# File 'lib/rio/alturi.rb', line 142 def ==(other) @parts == other.parts end |
#initialize_copy(other) ⇒ Object
137 138 139 140 141 |
# File 'lib/rio/alturi.rb', line 137 def initialize_copy(other) @ext = other.ext super @parts = other.parts.dup end |
#length ⇒ Object
148 149 150 |
# File 'lib/rio/alturi.rb', line 148 def length self.to_s.length end |
#normalize ⇒ Object
145 146 147 |
# File 'lib/rio/alturi.rb', line 145 def normalize self end |
#sub(re, arg) ⇒ Object
151 152 153 154 155 |
# File 'lib/rio/alturi.rb', line 151 def sub(re,arg) cp = self.clone cp.path = cp.path.sub(re,arg) cp end |