Class: URI::Generic Private

Inherits:
Object
  • Object
show all
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

Pione::Location::LocationScheme

Instance Method Summary collapse

Instance Method Details

#as_directoryGeneric

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.

Returns:

  • (Generic)

    directory path 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.

Returns:

  • (Boolean)

    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.

Returns:

  • (Boolean)

    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.

Returns:

  • (Boolean)

    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