Class: Adhearsion::Configuration::TelephonyPlatformConfiguration

Inherits:
AbstractConfiguration show all
Defined in:
lib/adhearsion/initializer/configuration.rb

Overview

Abstract superclass for AsteriskConfiguration and FreeSwitchConfiguration.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ConfigurationEntryPoint

#add_configuration_for

Constructor Details

#initialize(overrides = {}) ⇒ TelephonyPlatformConfiguration

Returns a new instance of TelephonyPlatformConfiguration.



137
138
139
140
141
# File 'lib/adhearsion/initializer/configuration.rb', line 137

def initialize(overrides = {})
  @listening_host = overrides.has_key?(:host) ? overrides.delete(:host) : self.class.default_listening_host
  @listening_port = overrides.has_key?(:port) ? overrides.delete(:port) : self.class.default_listening_port
  super
end

Instance Attribute Details

#listening_hostObject

Returns the value of attribute listening_host.



125
126
127
# File 'lib/adhearsion/initializer/configuration.rb', line 125

def listening_host
  @listening_host
end

#listening_portObject

Returns the value of attribute listening_port.



124
125
126
# File 'lib/adhearsion/initializer/configuration.rb', line 124

def listening_port
  @listening_port
end

Class Method Details

.default_listening_hostObject



132
133
134
# File 'lib/adhearsion/initializer/configuration.rb', line 132

def default_listening_host
  '0.0.0.0'
end

.default_listening_portObject



128
129
130
# File 'lib/adhearsion/initializer/configuration.rb', line 128

def default_listening_port
  abstract_method!
end