Sha256: affe002194fb337bb759fb2a0b2e2cc2c28313ef091596d79e8073ec9a1ff11f

Contents?: true

Size: 430 Bytes

Versions: 3

Compression:

Stored size: 430 Bytes

Contents

# encoding: utf-8

module Adhearsion
  class Event
    class End < Event
      register :end, :core

      include HasHeaders

      attribute :reason, Symbol
      attribute :platform_code, String

      def inherit(xml_node)
        if reason_node = xml_node.at_xpath('*')
          self.reason = reason_node.name
          self.platform_code = reason_node['platform-code']
        end
        super
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
adhearsion-3.0.0.rc1 lib/adhearsion/event/end.rb
adhearsion-3.0.0.beta2 lib/adhearsion/event/end.rb
adhearsion-3.0.0.beta1 lib/adhearsion/event/end.rb