Class: Officedoc::Package
- Inherits:
-
Object
- Object
- Officedoc::Package
- Includes:
- NullObject::Conversions
- Defined in:
- lib/officedoc/package.rb,
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: Raw
Instance Attribute Summary collapse
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
-
#initialize(filename: Officedoc.null, stream: Officedoc.null) ⇒ Package
constructor
A new instance of Package.
Constructor Details
#initialize(filename: Officedoc.null, stream: Officedoc.null) ⇒ Package
Returns a new instance of Package.
11 12 13 14 15 16 17 |
# File 'lib/officedoc/package.rb', line 11 def initialize( filename: Officedoc.null, stream: Officedoc.null ) @filename = filename unless Actual(stream) stream = open( filename, "rb" ) if Actual(filename) end @raw = Raw.new( stream ) end |
Instance Attribute Details
#filename ⇒ Object
Returns the value of attribute filename.
8 9 10 |
# File 'lib/officedoc/package.rb', line 8 def filename @filename end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
9 10 11 |
# File 'lib/officedoc/package.rb', line 9 def raw @raw end |