Sha256: 15665ae06aa9d6ffe6cafb38b0f0ac240d76a399cdcaa905108b0225289c29dd
Contents?: true
Size: 776 Bytes
Versions: 39
Compression:
Stored size: 776 Bytes
Contents
module HQMF2 module Utilities include HQMF::Conversion::Utilities # Utility function to handle optional attributes # @param xpath an XPath that identifies an XML attribute # @return the value of the attribute or nil if the attribute is missing def attr_val(xpath) Utilities::attr_val(@entry, xpath) end # Utility function to handle optional attributes # @param xpath an XPath that identifies an XML attribute # @return the value of the attribute or nil if the attribute is missing def self.attr_val(node, xpath) attr = node.at_xpath(xpath, HQMF2::Document::NAMESPACES) if attr attr.value else nil end end def to_xml @entry.to_xml end end end
Version data entries
39 entries across 39 versions & 2 rubygems