Class: Adhearsion::VoIP::DSL::Dialplan::ContextsEnvelope
- Defined in:
- lib/adhearsion/voip/dsl/dialplan/parser.rb
Instance Attribute Summary collapse
-
#parsed_contexts ⇒ Object
readonly
Returns the value of attribute parsed_contexts.
Instance Method Summary collapse
-
#initialize ⇒ ContextsEnvelope
constructor
A new instance of ContextsEnvelope.
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize ⇒ ContextsEnvelope
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 (name) { block } end |
Instance Attribute Details
#parsed_contexts ⇒ Object (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 |