Parent

Files

Class/Module Index [+]

Quicksearch

Ganapati::FileUrl

Attributes

host[R]
path[R]
port[R]
scheme[R]

Public Class Methods

new(url, default_scheme='yourmom', default_host='localhost', default_port=8118) click to toggle source
# File lib/ganapati/utils.rb, line 5
def initialize(url, default_scheme='yourmom', default_host='localhost', default_port=8118)
  @url = url
  if @url.start_with? 'file://' or (not @url.start_with? 'hdfs://' and default_scheme == :file)
    parse_file_scheme
  else
    parse_hdfs_scheme(default_host, default_port)
  end
end

Public Instance Methods

hdfs?() click to toggle source
# File lib/ganapati/utils.rb, line 18
def hdfs?
  @scheme == :hdfs
end
local?() click to toggle source
# File lib/ganapati/utils.rb, line 22
def local?
  @scheme == :file
end
to_s() click to toggle source
# File lib/ganapati/utils.rb, line 14
def to_s
  @url
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.