class ChunkyPNG::Chunk::Generic
The Generic
chunk type will read the content from the chunk as it, and will write it back as it was read.
Attributes
The attribute to store the content from the chunk, which gets written by the write
method.
Public Class Methods
Source
# File lib/chunky_png/chunk.rb 100 def initialize(type, content = "") 101 super(type, content: content) 102 end
Calls superclass method
ChunkyPNG::Chunk::Base::new
Source
# File lib/chunky_png/chunk.rb 108 def self.read(type, content) 109 new(type, content) 110 end
Creates an instance, given the chunk’s type and content. @param type [String] The four character chunk type indicator. @param content [String] The content read from the chunk. @return [ChunkyPNG::Chunk::Generic] The new chunk instance.