Module: URI::Component::PathMixin

Defined in:
lib/uri/component/path.rb

Instance Method Summary collapse

Instance Method Details

#initialize_copy(uri) ⇒ Object



84
85
86
87
88
89
90
# File 'lib/uri/component/path.rb', line 84

def initialize_copy(uri)
  if (path = uri.instance_variable_get('@path_component'))
    @path_component = path.dup
  end

  super(uri)
end

#pathObject



92
93
94
# File 'lib/uri/component/path.rb', line 92

def path
  return @path_component ? @path_component.to_uri : @path
end

#path=(path_str) ⇒ Object



96
97
98
99
100
101
# File 'lib/uri/component/path.rb', line 96

def path=(path_str)
  super(path_str)

  parse_path!
  return self.path
end

#path_componentObject Also known as: path_c



103
104
105
106
# File 'lib/uri/component/path.rb', line 103

def path_component
  parse_path! unless @path_component
  return @path_component
end