Class: URI::Generic Private
- Inherits:
-
Object
- Object
- URI::Generic
- Defined in:
- lib/pione/patch/uri-patch.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Direct Known Subclasses
Instance Method Summary collapse
-
#as_directory ⇒ Generic
private
Converts the uri into directory form.
-
#directory? ⇒ Boolean
private
Returns true if the path represents a directory.
-
#file? ⇒ Boolean
private
Returns true if the path represents a file.
-
#pione? ⇒ Boolean
private
Returns true if the scheme is supportted by PIONE system.
Instance Method Details
#as_directory ⇒ Generic
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Converts the uri into directory form.
34 35 36 37 38 39 40 |
# File 'lib/pione/patch/uri-patch.rb', line 34 def as_directory if directory? self else self.clone.tap{|s| s.path = s.path + "/"} end end |
#directory? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns true if the path represents a directory.
20 21 22 |
# File 'lib/pione/patch/uri-patch.rb', line 20 def directory? path[-1] == '/' end |
#file? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns true if the path represents a file.
27 28 29 |
# File 'lib/pione/patch/uri-patch.rb', line 27 def file? not(directory?) end |
#pione? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns true if the scheme is supportted by PIONE system.
13 14 15 |
# File 'lib/pione/patch/uri-patch.rb', line 13 def pione? false end |