Class: BetterUri::URI
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- BetterUri::URI
- Defined in:
- lib/better_uri/uri.rb
Instance Attribute Summary collapse
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
- #dup ⇒ Object
- #empty? ⇒ Boolean
-
#initialize(string) ⇒ URI
constructor
A new instance of URI.
- #query ⇒ Object (also: #params)
- #query_string ⇒ Object
- #query_string=(val) ⇒ Object (also: #query=)
Constructor Details
Instance Attribute Details
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
9 10 11 |
# File 'lib/better_uri/uri.rb', line 9 def uri @uri end |
Instance Method Details
#dup ⇒ Object
19 20 21 |
# File 'lib/better_uri/uri.rb', line 19 def dup self.class.new(@uri.to_s) end |
#empty? ⇒ Boolean
15 16 17 |
# File 'lib/better_uri/uri.rb', line 15 def empty? @uri.to_s.empty? end |
#query ⇒ Object Also known as: params
32 33 34 |
# File 'lib/better_uri/uri.rb', line 32 def query BetterUri::Query.new(self) end |
#query_string ⇒ Object
23 24 25 |
# File 'lib/better_uri/uri.rb', line 23 def query_string @uri.query end |
#query_string=(val) ⇒ Object Also known as: query=
27 28 29 |
# File 'lib/better_uri/uri.rb', line 27 def query_string=(val) @uri.query = val end |