Class: DotCloud::Host

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/dotcloud/host.rb

Instance Method Summary collapse

Constructor Details

#initializeHost

Returns a new instance of Host.



5
6
7
# File 'lib/dotcloud/host.rb', line 5

def initialize
  reset
end

Instance Method Details

#hostObject Also known as: str



16
17
18
19
# File 'lib/dotcloud/host.rb', line 16

def host
  do_match unless @host
  @host
end

#idObject



34
35
36
37
# File 'lib/dotcloud/host.rb', line 34

def id
  do_match unless @id
  @id
end

#namespaceObject Also known as: application, app



22
23
24
25
# File 'lib/dotcloud/host.rb', line 22

def namespace
  do_match unless @namespace
  @namespace
end

#resetObject



9
10
11
12
13
14
# File 'lib/dotcloud/host.rb', line 9

def reset
  @host = nil
  @namespace = nil
  @service = nil
  @id = nil
end

#serviceObject



29
30
31
32
# File 'lib/dotcloud/host.rb', line 29

def service
  do_match unless @service
  @service
end

#typeObject

Raises:

  • (ArgumentError)


39
40
41
# File 'lib/dotcloud/host.rb', line 39

def type
  raise ArgumentError, "TODO: parse dotcloud.yml to get service mappings"
end