Class: Adhearsion::VoIP::Asterisk::ConfigFileGenerators::Voicemail::RecordingDefinition
- Inherits:
-
AsteriskConfigGenerator
- Object
- AsteriskConfigGenerator
- Adhearsion::VoIP::Asterisk::ConfigFileGenerators::Voicemail::RecordingDefinition
- Defined in:
- lib/adhearsion/voip/asterisk/config_generators/voicemail.conf.rb
Constant Summary
Constants inherited from AsteriskConfigGenerator
AsteriskConfigGenerator::SECTION_TITLE
Instance Attribute Summary collapse
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
Instance Method Summary collapse
- #allowed_length(seconds) ⇒ Object
- #format(symbol) ⇒ Object
-
#initialize ⇒ RecordingDefinition
constructor
A new instance of RecordingDefinition.
- #maximum_silence(seconds) ⇒ Object
Methods inherited from AsteriskConfigGenerator
create_sanitary_hash_from, #to_sanitary_hash, warning_message
Constructor Details
#initialize ⇒ RecordingDefinition
Returns a new instance of RecordingDefinition.
211 212 213 214 |
# File 'lib/adhearsion/voip/asterisk/config_generators/voicemail.conf.rb', line 211 def initialize @properties = {} super end |
Instance Attribute Details
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
210 211 212 |
# File 'lib/adhearsion/voip/asterisk/config_generators/voicemail.conf.rb', line 210 def properties @properties end |
Instance Method Details
#allowed_length(seconds) ⇒ Object
220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/adhearsion/voip/asterisk/config_generators/voicemail.conf.rb', line 220 def allowed_length(seconds) case seconds when Fixnum int :maxmessage => "value" when Range int :minmessage => seconds.first int :maxmessage => seconds.last else raise ArgumentError, "Argument must be a Fixnum or Range!" end end |
#format(symbol) ⇒ Object
216 217 218 |
# File 'lib/adhearsion/voip/asterisk/config_generators/voicemail.conf.rb', line 216 def format(symbol) one_of [:gsm, :wav49, :wav], :format => symbol end |
#maximum_silence(seconds) ⇒ Object
232 233 234 |
# File 'lib/adhearsion/voip/asterisk/config_generators/voicemail.conf.rb', line 232 def maximum_silence(seconds) int :maxsilence => seconds end |