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

Version Path
health-data-standards-3.2.4 lib/hqmf-parser/2.0/utilities.rb
health-data-standards-3.2.3 lib/hqmf-parser/2.0/utilities.rb
health-data-standards-3.2.2 lib/hqmf-parser/2.0/utilities.rb
health-data-standards-3.2.1 lib/hqmf-parser/2.0/utilities.rb
health-data-standards-3.2.0 lib/hqmf-parser/2.0/utilities.rb
health-data-standards-3.1.1 lib/hqmf-parser/2.0/utilities.rb
health-data-standards-3.1.0 lib/hqmf-parser/2.0/utilities.rb
health-data-standards-3.0.6 lib/hqmf-parser/2.0/utilities.rb
health-data-standards-3.0.5 lib/hqmf-parser/2.0/utilities.rb
health-data-standards-3.0.4 lib/hqmf-parser/2.0/utilities.rb
health-data-standards-3.0.3 lib/hqmf-parser/2.0/utilities.rb
hqmf-parser-1.1.0 lib/hqmf-parser/2.0/utilities.rb
hqmf-parser-1.0.6 lib/hqmf-parser/2.0/utilities.rb
hqmf-parser-1.0.5 lib/hqmf-parser/2.0/utilities.rb
hqmf-parser-1.0.4 lib/hqmf-parser/2.0/utilities.rb
hqmf-parser-1.0.3 lib/hqmf-parser/2.0/utilities.rb
hqmf-parser-1.0.2 lib/hqmf-parser/2.0/utilities.rb
hqmf-parser-1.0.1 lib/hqmf-parser/2.0/utilities.rb
hqmf-parser-1.0.0 lib/hqmf-parser/2.0/utilities.rb