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.



53
54
55
# File 'lib/adhearsion/voip/dsl/dialplan/parser.rb', line 53

def initialize
  @parsed_contexts = {}
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



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

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.



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

def parsed_contexts
  @parsed_contexts
end