Sha256: 2e7a251f5386fd8bec1f890f6a681fa3bad9a7aa7db03a61ef78b757d4a69657

Contents?: true

Size: 509 Bytes

Versions: 24

Compression:

Stored size: 509 Bytes

Contents

# encoding: utf-8

module Punchblock
  class Event < RayoNode
    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
  end
end

%w{
  answered
  asterisk
  complete
  dtmf
  end
  joined
  offer
  ringing
  unjoined
  started_speaking
  stopped_speaking
}.each { |e| require "punchblock/event/#{e}"}

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
punchblock-1.9.4 lib/punchblock/event.rb
punchblock-1.9.3 lib/punchblock/event.rb
punchblock-1.9.2 lib/punchblock/event.rb
punchblock-1.9.1 lib/punchblock/event.rb
punchblock-1.9.0 lib/punchblock/event.rb
punchblock-1.8.2 lib/punchblock/event.rb
punchblock-1.8.1 lib/punchblock/event.rb
punchblock-1.8.0 lib/punchblock/event.rb
punchblock-1.7.1 lib/punchblock/event.rb
punchblock-1.7.0 lib/punchblock/event.rb
punchblock-1.6.1 lib/punchblock/event.rb
punchblock-1.6.0 lib/punchblock/event.rb
punchblock-1.5.3 lib/punchblock/event.rb
punchblock-1.5.2 lib/punchblock/event.rb
punchblock-1.5.1 lib/punchblock/event.rb
punchblock-1.5.0 lib/punchblock/event.rb
punchblock-1.4.1 lib/punchblock/event.rb
punchblock-1.4.0 lib/punchblock/event.rb
punchblock-1.3.0 lib/punchblock/event.rb
punchblock-1.2.0 lib/punchblock/event.rb