Sha256: de5e862345275fe563e51affec669e52092d22db2426ca73d8455ed359a0732f

Contents?: true

Size: 287 Bytes

Versions: 2

Compression:

Stored size: 287 Bytes

Contents

# frozen_string_literal: true

module Extract
  class Within < Base
    def value
      props = node.props
      paths = extractor.paths_of(node.path, props[:within])
      return "" if paths.empty?

      HashBuilder.new(Node.new(props, paths.first), extractor).value
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
xml_data_extractor-0.7.0 lib/src/extract/within.rb
xml_data_extractor-0.6.0 lib/src/extract/within.rb