This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol Node: Hashable { | |
var localizedName: String {get set} | |
} | |
class File: Node { | |
let fileID: Int | |
var localizedName: String | |
let hashValue : Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |