class ChunkyPNG::Chunk::End
The End
(IEND) chunk indicates the last chunk of a PNG stream. It does not contain any data.
Public Class Methods
Source
# File lib/chunky_png/chunk.rb 176 def initialize 177 super("IEND") 178 end
Calls superclass method
ChunkyPNG::Chunk::Base::new
Source
# File lib/chunky_png/chunk.rb 187 def self.read(type, content) 188 raise ExpectationFailed, "The IEND chunk should be empty!" if content.bytesize > 0 189 new 190 end
Reads the END chunk. It will check if the content is empty. @param type [String] The four character chunk type indicator (=
"IEND").
@param content [String] The content read from the chunk. Should be
empty.
@return [ChunkyPNG::Chunk::End] The new End
chunk instance. @raise [ChunkyPNG::ExpectationFailed] Raises an exception if the content was not empty.
Public Instance Methods
Source
# File lib/chunky_png/chunk.rb 194 def content 195 "".b 196 end
Returns an empty string, because this chunk should always be empty. @return [“”] An empty string.