Class: OpenXml::Parts::UnparsedPart

Inherits:
Object
  • Object
show all
Defined in:
lib/openxml/parts/unparsed_part.rb

Instance Method Summary collapse

Constructor Details

#initialize(content) ⇒ UnparsedPart


5
6
7
# File 'lib/openxml/parts/unparsed_part.rb', line 5

def initialize(content)
  @content = content
end

Instance Method Details

#contentObject


9
10
11
12
# File 'lib/openxml/parts/unparsed_part.rb', line 9

def content
  @content = @content.get_input_stream.read if promise?
  @content
end

#promise?Boolean


14
15
16
# File 'lib/openxml/parts/unparsed_part.rb', line 14

def promise?
  @content.respond_to? :get_input_stream
end