Module: URI::Component::PathMixin
- Defined in:
- lib/uri/component/path.rb
Overview
:nodoc:
Instance Method Summary collapse
- #initialize_copy(uri) ⇒ Object
- #path ⇒ Object
- #path=(path_str) ⇒ Object
- #path_component ⇒ Object (also: #path_c)
Instance Method Details
#initialize_copy(uri) ⇒ Object
88 89 90 91 92 93 94 |
# File 'lib/uri/component/path.rb', line 88 def initialize_copy(uri) if (path = uri.instance_variable_get('@path_component')) @path_component = path.dup end super(uri) end |
#path ⇒ Object
96 97 98 |
# File 'lib/uri/component/path.rb', line 96 def path return @path_component ? @path_component.to_uri : @path end |
#path=(path_str) ⇒ Object
100 101 102 103 104 105 |
# File 'lib/uri/component/path.rb', line 100 def path=(path_str) super(path_str) parse_path! return self.path end |
#path_component ⇒ Object Also known as: path_c
107 108 109 110 |
# File 'lib/uri/component/path.rb', line 107 def path_component parse_path! unless @path_component return @path_component end |