class DocImageExtract::Document

Attributes

file[R]

Public Class Methods

new(file) click to toggle source
# File lib/doc_image_extract/document.rb, line 5
def initialize file
  @file = file
end

Public Instance Methods

pictures() click to toggle source
# File lib/doc_image_extract/document.rb, line 19
def pictures
  reader.pictures
end
reader() click to toggle source
# 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