Class: HAST::Postfix

Inherits:
Object
  • Object
show all
Defined in:
lib/hast/postfix.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Postfix

Returns a new instance of Postfix.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/hast/postfix.rb', line 5

def initialize(config)
  @config = config
  @domains = []

  case @config['postfix']['method']
  when 'file'
    vhost_file
  when 'database'
    mysql
  when nil
    raise "ERROR: Postfix method not specified!"
  else
    raise "ERROR: Unknown Postfix method '#{@config['postfix']['method']}'"
  end
end

Instance Attribute Details

#domainsObject (readonly)

Returns the value of attribute domains.



3
4
5
# File 'lib/hast/postfix.rb', line 3

def domains
  @domains
end