Class: Roo::Excelx::Relationships

Inherits:
Extractor
  • Object
show all
Defined in:
lib/roo/excelx/relationships.rb

Constant Summary

Constants inherited from Extractor

Extractor::COMMON_STRINGS

Instance Method Summary collapse

Methods inherited from Extractor

#initialize

Constructor Details

This class inherits a constructor from Roo::Excelx::Extractor

Instance Method Details

#[](index) ⇒ Object



8
9
10
# File 'lib/roo/excelx/relationships.rb', line 8

def [](index)
  to_a[index]
end

#include_type?(type) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
19
20
# File 'lib/roo/excelx/relationships.rb', line 16

def include_type?(type)
  to_a.any? do |_, rel|
    rel["Type"]&.include? type
  end
end

#to_aObject



12
13
14
# File 'lib/roo/excelx/relationships.rb', line 12

def to_a
  @relationships ||= extract_relationships
end