Class: Officedoc::Package

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#filenameObject

Returns the value of attribute filename.



8
9
10
# File 'lib/officedoc/package.rb', line 8

def filename
  @filename
end

#rawObject (readonly)

Returns the value of attribute raw.



9
10
11
# File 'lib/officedoc/package.rb', line 9

def raw
  @raw
end