Class: URIHelper::URIBuilder
- Inherits:
-
Object
- Object
- URIHelper::URIBuilder
- 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.
6 7 8 |
# File 'lib/uri_helper.rb', line 6 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/uri_helper.rb', line 4 def @options end |
Instance Method Details
#build_url(endpoint) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/uri_helper.rb', line 10 def build_url(endpoint) api = @options.api_url_base if endpoint.include?('download_config_specs') api = @options.api_url_download_config_specs end unless api.end_with?('/') api += '/' end "#{api}#{endpoint}" end |