Class: Punchblock::Event

Inherits:
RayoNode show all
Defined in:
lib/punchblock/event.rb,
lib/punchblock/event/end.rb,
lib/punchblock/event/dtmf.rb,
lib/punchblock/event/offer.rb,
lib/punchblock/event/joined.rb,
lib/punchblock/event/ringing.rb,
lib/punchblock/event/answered.rb,
lib/punchblock/event/asterisk.rb,
lib/punchblock/event/complete.rb,
lib/punchblock/event/unjoined.rb,
lib/punchblock/event/asterisk/ami.rb,
lib/punchblock/event/active_speaker.rb,
lib/punchblock/event/started_speaking.rb,
lib/punchblock/event/stopped_speaking.rb,
lib/punchblock/event/asterisk/ami/event.rb

Defined Under Namespace

Modules: ActiveSpeaker, Asterisk Classes: Answered, Complete, DTMF, End, Joined, Offer, Ringing, StartedSpeaking, StoppedSpeaking, Unjoined

Constant Summary

Constants inherited from RayoNode

RayoNode::InvalidNodeError

Instance Attribute Summary

Attributes inherited from RayoNode

#client, #component_id, #connection, #domain, #original_component, #target_call_id, #target_mixer_name

Class Method Summary collapse

Methods inherited from RayoNode

class_from_registration, #eql?, import, #inspect, #inspect_attributes, register, #source

Class Method Details

.new(options = {}) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/punchblock/event.rb', line 5

def self.new(options = {})
  super().tap do |new_node|
    case options
    when Nokogiri::XML::Node
      new_node.inherit options
    when Hash
      options.each_pair { |k,v| new_node.send :"#{k}=", v }
    end
  end
end