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.9.4 lib/punchblock/event/end.rb
punchblock-1.9.3 lib/punchblock/event/end.rb
punchblock-1.9.2 lib/punchblock/event/end.rb
punchblock-1.9.1 lib/punchblock/event/end.rb
punchblock-1.9.0 lib/punchblock/event/end.rb
punchblock-1.8.2 lib/punchblock/event/end.rb
punchblock-1.8.1 lib/punchblock/event/end.rb
punchblock-1.8.0 lib/punchblock/event/end.rb
punchblock-1.7.1 lib/punchblock/event/end.rb
punchblock-1.7.0 lib/punchblock/event/end.rb
punchblock-1.6.1 lib/punchblock/event/end.rb
punchblock-1.6.0 lib/punchblock/event/end.rb
punchblock-1.5.3 lib/punchblock/event/end.rb
punchblock-1.5.2 lib/punchblock/event/end.rb
punchblock-1.5.1 lib/punchblock/event/end.rb
punchblock-1.5.0 lib/punchblock/event/end.rb
punchblock-1.4.1 lib/punchblock/event/end.rb
punchblock-1.4.0 lib/punchblock/event/end.rb
punchblock-1.3.0 lib/punchblock/event/end.rb
punchblock-1.2.0 lib/punchblock/event/end.rb