Class: WcoHosting::Appliance

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document, Mongoid::Timestamps
Defined in:
app/models/wco_hosting/appliance.rb

Constant Summary collapse

STATE_PENDING =
'state-pending'
STATE_LIVE =
'state-live'
STATE_TERM =
'state-term'

Instance Method Summary collapse

Instance Method Details

#hostObject



19
20
21
# File 'app/models/wco_hosting/appliance.rb', line 19

def host
  "#{subdomain}.#{domain}"
end

#kindObject



29
30
31
# File 'app/models/wco_hosting/appliance.rb', line 29

def kind
  tmpl.kind
end

#set_service_nameObject



11
12
13
# File 'app/models/wco_hosting/appliance.rb', line 11

def set_service_name
  self[:service_name] = host.gsub(".", "_")
end

#tmplObject



26
27
28
# File 'app/models/wco_hosting/appliance.rb', line 26

def tmpl
  appliance_tmpl
end