Class: DocImageExtract::Reader::Hwpf
- Inherits:
-
Object
- Object
- DocImageExtract::Reader::Hwpf
- Defined in:
- lib/doc_image_extract/reader/hwpf.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
Instance Method Summary collapse
-
#initialize(file) ⇒ Hwpf
constructor
A new instance of Hwpf.
- #pictures ⇒ Object
Constructor Details
#initialize(file) ⇒ Hwpf
Returns a new instance of Hwpf.
11 12 13 |
# File 'lib/doc_image_extract/reader/hwpf.rb', line 11 def initialize(file) @file = file end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
9 10 11 |
# File 'lib/doc_image_extract/reader/hwpf.rb', line 9 def file @file end |
Instance Method Details
#pictures ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/doc_image_extract/reader/hwpf.rb', line 15 def pictures document = HWPFDocument.new FileInputStream.new file pictures_table = document.get_pictures_table pictures_table.get_all_pictures.map do |picture| filename = picture.suggest_full_file_name data = picture.get_content DocImageExtract::Picture.new filename, data end end |