Method: Origami::Stream#cast_to
- Defined in:
- lib/origami/stream.rb
#cast_to(type, _parser = nil) ⇒ Object
246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/origami/stream.rb', line 246 def cast_to(type, _parser = nil) super(type) cast = type.new("", self.dictionary.copy) cast.encoded_data = self.encoded_data.dup cast.no, cast.generation = self.no, self.generation cast.set_indirect(true) cast.set_document(self.document) cast.file_offset = self.file_offset cast end |