Class: Adhearsion::DialPlan

Inherits:
Object show all
Defined in:
lib/adhearsion/voip/dial_plan.rb,
lib/adhearsion/voip/asterisk/special_dial_plan_managers.rb

Defined Under Namespace

Classes: ConfirmationManager, DialplanContextProc, ExecutionEnvironment, Loader, Manager

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(loader = Loader) ⇒ DialPlan

Returns a new instance of DialPlan.



24
25
26
27
# File 'lib/adhearsion/voip/dial_plan.rb', line 24

def initialize(loader = Loader)
  @loader       = loader
  @entry_points = @loader.load_dialplans.contexts
end

Instance Attribute Details

#entry_pointsObject

Returns the value of attribute entry_points.



23
24
25
# File 'lib/adhearsion/voip/dial_plan.rb', line 23

def entry_points
  @entry_points
end

#loaderObject

Returns the value of attribute loader.



23
24
25
# File 'lib/adhearsion/voip/dial_plan.rb', line 23

def loader
  @loader
end

Instance Method Details

#lookup(context_name) ⇒ Object

Lookup and return an entry point by context name



32
33
34
# File 'lib/adhearsion/voip/dial_plan.rb', line 32

def lookup(context_name)
  entry_points[context_name]
end