Class: Goldendocx::Docx::UnStructuredEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/goldendocx/docx.rb

Overview

TODO: Remove this after all structured

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(entry) ⇒ UnStructuredEntry

Returns a new instance of UnStructuredEntry.



139
140
141
# File 'lib/goldendocx/docx.rb', line 139

def initialize(entry)
  @entry = entry
end

Instance Attribute Details

#entryObject (readonly)

Returns the value of attribute entry.



137
138
139
# File 'lib/goldendocx/docx.rb', line 137

def entry
  @entry
end

Instance Method Details

#write_to(zos) ⇒ Object



143
144
145
146
147
148
# File 'lib/goldendocx/docx.rb', line 143

def write_to(zos)
  zos.put_next_entry entry.name
  return if entry.directory?

  zos.write entry.get_input_stream.read
end