Skip to content

Instantly share code, notes, and snippets.

protocol Node: Hashable {
var localizedName: String {get set}
}
class File: Node {
let fileID: Int
var localizedName: String
let hashValue : Int
# Converting Nokogiri parsed XML to_hash
# adds "-2", "-3", etc to the key in case of multiple items
# only elements
module Extensions
module Document
def to_hash
root.to_hash
end
end