Sha256: 6c1a4ab61c0dc49a8ec8e936451fb7a04fa9b784c63e965265ba621572a15e2b
Contents?: true
Size: 442 Bytes
Versions: 12
Compression:
Stored size: 442 Bytes
Contents
require 'nokogiri' module Jazzy module XMLHelper # Gets value of XML attribute or nil # (i.e. file in <Class file="Musician.swift"></Class>) def self.attribute(node, name) node.attributes[name].value if node.attributes[name] end # Gets text in XML node or nil (i.e. s:cMyUSR <USR>s:cMyUSR</USR>) def self.xpath(node, xpath) node.xpath(xpath).text if node.xpath(xpath).text.length > 0 end end end
Version data entries
12 entries across 12 versions & 1 rubygems