Class: At_email::Core::Default
- Inherits:
-
Object
- Object
- At_email::Core::Default
show all
- Defined in:
- lib/at_email/core/default.rb
Constant Summary
collapse
- CLASS_DISPLAY_NAME =
'atEmail - Default Class'
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of Default.
8
9
10
11
12
13
14
15
|
# File 'lib/at_email/core/default.rb', line 8
def initialize()
@properties = {}
@properties['State'] = 'New'
@properties['ID'] = At_email::Formatting.new.get_random_id(5)
@properties['Display Name'] = CLASS_DISPLAY_NAME
@properties['Log Prefix'] = @properties['Display Name'] + ': ' + @properties['ID']
@properties['State'] = 'Initialized'
end
|
Instance Attribute Details
#properties ⇒ Object
Returns the value of attribute properties.
6
7
8
|
# File 'lib/at_email/core/default.rb', line 6
def properties
@properties
end
|
Instance Method Details
#get(property) ⇒ Object
17
18
19
20
21
22
23
|
# File 'lib/at_email/core/default.rb', line 17
def get(property)
if !@properties[property]
log_event event_tag='ERROR', 'Cannot get property: ' + property + "\n" + __LINE__ + "\n" + (pp caller())
return false
end
return @properties[property]
end
|
25
26
27
28
29
|
# File 'lib/at_email/core/default.rb', line 25
def get_formatted(property)
value = get(property)
output = property + ': ' + value.to_s
return output
end
|
#get_state ⇒ Object
31
32
33
|
# File 'lib/at_email/core/default.rb', line 31
def get_state()
return get('State')
end
|
#set_state(value) ⇒ Object
35
36
37
|
# File 'lib/at_email/core/default.rb', line 35
def set_state(value)
set('State', value)
end
|