Class: Officedoc::Package::Raw
- Inherits:
-
Object
- Object
- Officedoc::Package::Raw
- Defined in:
- lib/officedoc/package/raw.rb,
lib/officedoc/package/raw/parts.rb,
lib/officedoc/package/raw/parts.rb,
lib/officedoc/package/raw/ruby_zip_engine.rb
Defined Under Namespace
Classes: Part, PartList, RubyZipEngine
Instance Attribute Summary collapse
-
#stream ⇒ Object
readonly
Returns the value of attribute stream.
-
#zip_engine ⇒ Object
readonly
Returns the value of attribute zip_engine.
Instance Method Summary collapse
- #document_type ⇒ Object
- #file_names ⇒ Object
-
#initialize(stream, zip_engine: ::Officedoc::Package::Raw::RubyZipEngine) ⇒ Raw
constructor
A new instance of Raw.
- #parts ⇒ Object
Constructor Details
#initialize(stream, zip_engine: ::Officedoc::Package::Raw::RubyZipEngine) ⇒ Raw
Returns a new instance of Raw.
10 11 12 13 |
# File 'lib/officedoc/package/raw.rb', line 10 def initialize( stream, zip_engine: ::Officedoc::Package::Raw::RubyZipEngine ) @zip_engine = zip_engine @stream = stream end |
Instance Attribute Details
#stream ⇒ Object (readonly)
Returns the value of attribute stream.
8 9 10 |
# File 'lib/officedoc/package/raw.rb', line 8 def stream @stream end |
#zip_engine ⇒ Object (readonly)
Returns the value of attribute zip_engine.
7 8 9 |
# File 'lib/officedoc/package/raw.rb', line 7 def zip_engine @zip_engine end |
Instance Method Details
#document_type ⇒ Object
24 25 26 |
# File 'lib/officedoc/package/raw.rb', line 24 def document_type @document_type ||= get_document_type end |
#file_names ⇒ Object
18 19 20 |
# File 'lib/officedoc/package/raw.rb', line 18 def file_names zip_file.entries.map(&:name) end |