Sha256: 5af2177e7129b5f663e64c4901d228e796428e4ea7220bb1fe7f859af2ecc8fe

Contents?: true

Size: 321 Bytes

Versions: 2

Compression:

Stored size: 321 Bytes

Contents

module Decontaminate
  module Decoder
    class ChildNodeProxy
      attr_reader :xpath, :decoder

      def initialize(xpath, decoder)
        @xpath = xpath
        @decoder = decoder
      end

      def decode(xml_node)
        child = xml_node.at_xpath xpath
        decoder.decode child
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
decontaminate-0.1.1 lib/decontaminate/decoder/child_node_proxy.rb
decontaminate-0.1.0 lib/decontaminate/decoder/child_node_proxy.rb