Class: NexClient::App
- Inherits:
-
BaseResource
- Object
- JsonApiClient::Resource
- BaseResource
- NexClient::App
- Defined in:
- lib/nex_client/app.rb
Constant Summary
Constants inherited from BaseResource
BaseResource::API_HOST, BaseResource::API_ROOT_PATH, BaseResource::ENVIRONMENT, BaseResource::HOST_MAPPING
Instance Method Summary collapse
Instance Method Details
#preferred_url ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/nex_client/app.rb', line 27 def preferred_url domain = self.domains.first rescue NexClient::Domain.find('origin.name' => self.name).first if domain "#{domain.ssl_available ? 'https':'http'}://#{domain.cname}" else "#{self.ssl_enabled ? 'https' : 'http'}://#{self.url}" end end |