Class: Kovid::UriBuilder
- Inherits:
-
Object
- Object
- Kovid::UriBuilder
- Defined in:
- lib/kovid/uri_builder.rb
Constant Summary collapse
- BASE_URI =
'corona.lmao.ninja'
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path = '') ⇒ UriBuilder
constructor
A new instance of UriBuilder.
- #url ⇒ Object
Constructor Details
#initialize(path = '') ⇒ UriBuilder
Returns a new instance of UriBuilder.
11 12 13 |
# File 'lib/kovid/uri_builder.rb', line 11 def initialize(path = '') @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
7 8 9 |
# File 'lib/kovid/uri_builder.rb', line 7 def path @path end |
Instance Method Details
#url ⇒ Object
15 16 17 |
# File 'lib/kovid/uri_builder.rb', line 15 def url URI::HTTPS.build(host: BASE_URI, path: path).to_s end |