Class: Adhearsion::VoIP::DSL::Dialplan::ContextsEnvelope

Inherits:
Object
  • Object
show all
Defined in:
lib/adhearsion/voip/dsl/dialplan/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeContextsEnvelope

Returns a new instance of ContextsEnvelope.



51
52
53
# File 'lib/adhearsion/voip/dsl/dialplan/parser.rb', line 51

def initialize
  @parsed_contexts = {}
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



57
58
59
60
61
# File 'lib/adhearsion/voip/dsl/dialplan/parser.rb', line 57

def method_missing(name, *args, &block)
  super unless block_given?
  @parsed_contexts[name] = block
  meta_def(name) { block }
end

Instance Attribute Details

#parsed_contextsObject (readonly)

Returns the value of attribute parsed_contexts.



55
56
57
# File 'lib/adhearsion/voip/dsl/dialplan/parser.rb', line 55

def parsed_contexts
  @parsed_contexts
end