Sha256: 42bf52d9595ec341752abebc3a0e5d224ac04c6a08e6abd2745e1f49ea777323

Contents?: true

Size: 454 Bytes

Versions: 25

Compression:

Stored size: 454 Bytes

Contents

# encoding: utf-8

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

      include HasHeaders

      def reason
        children.select { |c| c.is_a? Nokogiri::XML::Element }.first.name.to_sym
      end

      def reason=(other)
        self << Nokogiri::XML::Element.new(other.to_s, self.document)
      end

      def inspect_attributes # :nodoc:
        [:reason] + super
      end
    end # End
  end
end # Punchblock

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
punchblock-1.1.0 lib/punchblock/event/end.rb
punchblock-1.0.0 lib/punchblock/event/end.rb
punchblock-0.12.0 lib/punchblock/event/end.rb
punchblock-0.11.0 lib/punchblock/event/end.rb
punchblock-0.10.0 lib/punchblock/event/end.rb