Module: CallCenter

Defined in:
lib/call_center.rb,
lib/call_center/test/dsl.rb,
lib/call_center/flow_callback.rb,
lib/call_center/conditional_stack.rb,
lib/call_center/test/minitest/dsl.rb,
lib/call_center/deferred_callbacks.rb

Defined Under Namespace

Modules: AlwaysFlowCallback, ClassMethods, DeferredCallbacks, FailureFlowCallback, InstanceMethods, SuccessFlowCallback, Test, UniqueFlowCallback Classes: AfterFlowCallback, ConditionalStack, FlowCallback

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.cached_state_machinesObject

Returns the value of attribute cached_state_machines


16
17
18
# File 'lib/call_center.rb', line 16

def cached_state_machines
  @cached_state_machines
end

Class Method Details

.cache(klass, state_machine) ⇒ Object


20
21
22
# File 'lib/call_center.rb', line 20

def self.cache(klass, state_machine)
  self.cached_state_machines["#{klass.name}_#{state_machine.name}"] ||= state_machine
end

.cached(klass, state_machine_name) ⇒ Object


24
25
26
# File 'lib/call_center.rb', line 24

def self.cached(klass, state_machine_name)
  self.cached_state_machines["#{klass.name}_#{state_machine_name}"]
end

.included(base) ⇒ Object


10
11
12
13
# File 'lib/call_center.rb', line 10

def self.included(base)
  base.send(:include, InstanceMethods)
  base.extend(ClassMethods)
end

.render_twimlObject


28
29
30
31
32
33
34
35
# File 'lib/call_center.rb', line 28

def self.render_twiml
  xml = Builder::XmlMarkup.new
  xml.instruct!
  xml.Response do
    yield(xml)
  end
  xml.target!
end