Class: URIHelper::URIBuilder
- Inherits:
-
Object
- Object
- URIHelper::URIBuilder
- Extended by:
- T::Sig
- Defined in:
- lib/uri_helper.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #build_url(endpoint) ⇒ Object
-
#initialize(options) ⇒ URIBuilder
constructor
A new instance of URIBuilder.
Constructor Details
#initialize(options) ⇒ URIBuilder
Returns a new instance of URIBuilder.
13 14 15 |
# File 'lib/uri_helper.rb', line 13 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
10 11 12 |
# File 'lib/uri_helper.rb', line 10 def @options end |
Instance Method Details
#build_url(endpoint) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/uri_helper.rb', line 18 def build_url(endpoint) api = @options.api_url_base if endpoint.include?('download_config_specs') api = T.must(@options.api_url_download_config_specs) end unless api.end_with?('/') api += '/' end "#{api}#{endpoint}" end |