Class: Artifactory::Resource::URLBase
- Defined in:
- lib/artifactory/resources/url_base.rb
Class Method Summary collapse
-
.all(options = {}) ⇒ Array<Resource::URLBase>
List UrlBase in the system configuration.
-
.find(url, options = {}) ⇒ Resource::MailServer?
Find (fetch) the url base.
Instance Method Summary collapse
-
#url_base ⇒ Object
Return this object’s
url_base
. -
#url_base=(value) ⇒ Object
Set this object’s
url_base
. -
#url_base? ⇒ Boolean
Determines if the
url_base
value exists and is truthy.
Methods inherited from Base
attribute, attributes, #attributes, #client, #client=, #client?, #extract_client!, extract_client!, find_from_config, #format_repos!, format_repos!, from_hash, from_url, has_attribute?, #initialize, #inspect, list_from_config, #set, #to_hash, #to_json, #to_matrix_properties, #to_query_string_parameters, #to_s, #url_safe, url_safe
Constructor Details
This class inherits a constructor from Artifactory::Resource::Base
Class Method Details
.all(options = {}) ⇒ Array<Resource::URLBase>
List UrlBase in the system configuration.
34 35 36 37 |
# File 'lib/artifactory/resources/url_base.rb', line 34 def all( = {}) config = Resource::System.configuration() simple_text_from_config('config/urlBase', config, ) end |
.find(url, options = {}) ⇒ Resource::MailServer?
Find (fetch) the url base.
57 58 59 60 61 62 63 |
# File 'lib/artifactory/resources/url_base.rb', line 57 def find(url, = {}) config = Resource::System.configuration() find_from_config("config/urlBase[text()='#{url}']", config, ) rescue Error::HTTPError => e raise unless e.code == 404 nil end |
Instance Method Details
#url_base ⇒ Object
Return this object’s url_base
88 |
# File 'lib/artifactory/resources/url_base.rb', line 88 attribute :url_base, ->{ raise 'URL base missing!' } |
#url_base=(value) ⇒ Object
Set this object’s url_base
88 |
# File 'lib/artifactory/resources/url_base.rb', line 88 attribute :url_base, ->{ raise 'URL base missing!' } |
#url_base? ⇒ Boolean
Determines if the url_base
value exists and is truthy
88 |
# File 'lib/artifactory/resources/url_base.rb', line 88 attribute :url_base, ->{ raise 'URL base missing!' } |