Class: AemLookout::Sync::Hostname

Inherits:
Object
  • Object
show all
Defined in:
lib/aem_lookout/sync.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hostname) ⇒ Hostname

Returns a new instance of Hostname.



12
13
14
# File 'lib/aem_lookout/sync.rb', line 12

def initialize(hostname)
  @url = URI.parse(hostname)
end

Instance Attribute Details

#urlObject

Returns the value of attribute url.



10
11
12
# File 'lib/aem_lookout/sync.rb', line 10

def url
  @url
end

Instance Method Details

#credentialsObject



20
21
22
# File 'lib/aem_lookout/sync.rb', line 20

def credentials
  "#{url.user}:#{url.password}"
end

#url_without_credentialsObject



16
17
18
# File 'lib/aem_lookout/sync.rb', line 16

def url_without_credentials
  "#{url.scheme}://#{url.host}:#{url.port}/crx/-/jcr:root"
end