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_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.
18 19 20 21 |
# File 'lib/artifactory/resources/url_base.rb', line 18 def all( = {}) config = Resource::System.configuration() simple_text_from_config('config/urlBase', config, ) end |
.find(url, options = {}) ⇒ Resource::MailServer?
Find (fetch) the url base.
41 42 43 44 45 46 47 |
# File 'lib/artifactory/resources/url_base.rb', line 41 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
72 |
# File 'lib/artifactory/resources/url_base.rb', line 72 attribute :url_base, ->{ raise 'URL base missing!' } |
#url_base=(value) ⇒ Object
Set this object’s url_base
72 |
# File 'lib/artifactory/resources/url_base.rb', line 72 attribute :url_base, ->{ raise 'URL base missing!' } |
#url_base? ⇒ Boolean
Determines if the url_base
value exists and is truthy
72 |
# File 'lib/artifactory/resources/url_base.rb', line 72 attribute :url_base, ->{ raise 'URL base missing!' } |