Module: URI::Component::QueryMixin
- Defined in:
- lib/uri/component/query.rb
Instance Method Summary collapse
- #initialize_copy(uri) ⇒ Object
- #query ⇒ Object
- #query=(query_str) ⇒ Object
- #query_component ⇒ Object (also: #query_c)
Instance Method Details
#initialize_copy(uri) ⇒ Object
148 149 150 151 152 153 154 |
# File 'lib/uri/component/query.rb', line 148 def initialize_copy(uri) if (query = uri.instance_variable_get('@query_component')) @query_component = query.dup end super(uri) end |
#query ⇒ Object
156 157 158 |
# File 'lib/uri/component/query.rb', line 156 def query return @query_component ? @query_component.to_uri : @query end |
#query=(query_str) ⇒ Object
160 161 162 163 164 165 |
# File 'lib/uri/component/query.rb', line 160 def query=(query_str) super(query_str) parse_query! return self.query end |
#query_component ⇒ Object Also known as: query_c
167 168 169 170 |
# File 'lib/uri/component/query.rb', line 167 def query_component parse_query! unless @query_component return @query_component end |