Class: Property::Amavis
- Inherits:
-
Property
- Object
- ActiveRecord::Base
- Property
- Property::Amavis
show all
- Defined in:
- app/models/property/amavis.rb
Instance Attribute Summary
Attributes inherited from Property
#collection, #multiple, #translate
Class Method Summary
collapse
Methods inherited from Property
add, all_new_values, all_new_values_for_write, all_to_show, #has_new_value?, #input_type, #set_value
Class Method Details
.binary_template(a, locals) ⇒ Object
8
9
10
11
12
13
14
15
16
|
# File 'app/models/property/amavis.rb', line 8
def self.binary_template(a, locals)
a.edit :file => "#{etc_amavis}/50-user" do
locals.each do |key, value|
value = value == true or value == '1' ? '1' : '0'
delete /^\$#{key}.*;.*$/
append "$#{key} = #{value};"
end
end
end
|
.number_variable_template(a, locals) ⇒ Object
18
19
20
21
22
23
24
25
|
# File 'app/models/property/amavis.rb', line 18
def self.number_variable_template(a, locals)
a.edit :file => "#{etc_amavis}/50-user" do
locals.each do |key, value|
delete /^\$#{key}.*;.*$/
append "$#{key} = #{value};"
end
end
end
|
.service ⇒ Object
3
|
# File 'app/models/property/amavis.rb', line 3
def self.service; AMAVIS ;end
|
.string_variable_template(a, locals) ⇒ Object
27
28
29
30
31
32
33
34
|
# File 'app/models/property/amavis.rb', line 27
def self.string_variable_template(a, locals)
a.edit :file => "#{etc_amavis}/50-user" do
locals.each do |key, value|
delete /^\$#{key}.*;.*$/
append "$#{key} = '#{value}';"
end
end
end
|