Class: Services

Inherits:
Object
  • Object
show all
Defined in:
lib/mist/services.rb

Defined Under Namespace

Classes: Aws

Instance Method Summary collapse

Constructor Details

#initialize(config = {}) ⇒ Services

Returns a new instance of Services.



3
4
5
6
# File 'lib/mist/services.rb', line 3

def initialize(config = {})
    self.create(config[:new]) if config[:new]
    self.boot(config[:boot]) if config[:boot]
end

Instance Method Details

#boot(service) ⇒ Object



17
18
19
20
21
22
23
24
# File 'lib/mist/services.rb', line 17

def boot(service)
  case service
    when 'aws','AWS','Amazon Web Services'
      Services::Aws.new(:boot => service)
    else
      puts "That service schema was not recognized."
  end
end

#create(service) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/mist/services.rb', line 8

def create(service)
  case service
    when 'aws','AWS','Amazon Web Services'
      Services::Aws.new(:new => true)
    else
      puts "That service schema was not recognized."
  end
end