Class: RIO::StrIO::RRL
- Inherits:
-
RRL::IOIBase
- Object
- Base
- RRL::IOIBase
- RIO::StrIO::RRL
- Defined in:
- lib/rio/scheme/strio.rb
Constant Summary collapse
Constants inherited from RRL::IOIBase
Instance Attribute Summary collapse
-
#str ⇒ Object
Returns the value of attribute str.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(u, str = "") ⇒ RRL
constructor
A new instance of RRL.
- #open(m, *args) ⇒ Object
- #query ⇒ Object (also: #stringio)
- #query=(arg) ⇒ Object (also: #stringio=)
Methods inherited from RRL::IOIBase
#fspath, #opaque, #openfs_, #path, #scheme, #to_s
Methods inherited from Base
Constructor Details
Instance Attribute Details
#str ⇒ Object
Returns the value of attribute str.
38 39 40 |
# File 'lib/rio/scheme/strio.rb', line 38 def str @str end |
Class Method Details
.parse(*a) ⇒ Object
45 46 47 48 |
# File 'lib/rio/scheme/strio.rb', line 45 def self.parse(*a) u = a.shift.sub(/^rio:/,'') new(u,*a) end |
Instance Method Details
#open(m, *args) ⇒ Object
63 64 65 66 67 68 |
# File 'lib/rio/scheme/strio.rb', line 63 def open(m,*args) strio = self.stringio str = strio.string nstrio = self.stringio.reopen(str,m.to_s) super(nstrio) end |
#query ⇒ Object Also known as: stringio
58 59 60 |
# File 'lib/rio/scheme/strio.rb', line 58 def query uri.query.nil? ? nil : ObjectSpace._id2ref(uri.query.hex) end |