Class: Roo::Excelx::SharedStrings

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

Constant Summary collapse

COMMON_STRINGS =
{
  t: "t",
  r: "r",
  html_tag_open: "<html>",
  html_tag_closed: "</html>"
}

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



14
15
16
# File 'lib/roo/excelx/shared_strings.rb', line 14

def [](index)
  to_a[index]
end

#to_aObject



18
19
20
# File 'lib/roo/excelx/shared_strings.rb', line 18

def to_a
  @array ||= extract_shared_strings
end

#to_htmlObject



22
23
24
# File 'lib/roo/excelx/shared_strings.rb', line 22

def to_html
  @html ||= extract_html
end

#use_html?(index) ⇒ Boolean

Use to_html or to_a for html returns See what is happening with commit???

Returns:

  • (Boolean)


28
29
30
# File 'lib/roo/excelx/shared_strings.rb', line 28

def use_html?(index)
  to_html[index][/<([biu]|sup|sub)>/]
end