class Xsv::RelationshipsHandler
RelationshipsHandler
parses the “xl/_rels/workbook.xml.rels” file to get the existing relationships. This is used internally when opening a workbook.
Public Class Methods
get_relations(io)
click to toggle source
# File lib/xsv/relationships_handler.rb, line 7 def self.get_relations(io) relations = [] new { |relation| relations << relation }.parse(io) relations end
new(&block)
click to toggle source
# File lib/xsv/relationships_handler.rb, line 15 def initialize(&block) @block = block end
Public Instance Methods
start_element(name, attrs)
click to toggle source
# File lib/xsv/relationships_handler.rb, line 19 def start_element(name, attrs) @block.call(attrs.slice(:Id, :Type, :Target)) if name == 'Relationship' end