Class: DocImageExtract::Document
- Inherits:
-
Object
- Object
- DocImageExtract::Document
- Defined in:
- lib/doc_image_extract/document.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
Instance Method Summary collapse
-
#initialize(file) ⇒ Document
constructor
A new instance of Document.
- #pictures ⇒ Object
- #reader ⇒ Object
Constructor Details
#initialize(file) ⇒ Document
Returns a new instance of Document.
5 6 7 |
# File 'lib/doc_image_extract/document.rb', line 5 def initialize file @file = file end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
3 4 5 |
# File 'lib/doc_image_extract/document.rb', line 3 def file @file end |
Instance Method Details
#pictures ⇒ Object
19 20 21 |
# File 'lib/doc_image_extract/document.rb', line 19 def pictures reader.pictures end |
#reader ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/doc_image_extract/document.rb', line 9 def reader @reader ||= begin if file =~ /docx\Z/ Reader::Xwpf.new file else Reader::Hwpf.new file end end end |