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
content[RW]
The attribute to store the content from the chunk, which gets written by
the write
method.
Public Class Methods
new(type, content = '')
click to toggle source
Calls superclass method
ChunkyPNG::Chunk::Base.new
# File lib/chunky_png/chunk.rb, line 92 def initialize(type, content = '') super(type, :content => content) end
read(type, content)
click to toggle source
Creates an instance, given the chunk's type and content. @param [String] type The four character chunk type indicator. @param [String] content The content read from the chunk. @return [ChunkyPNG::Chunk::Generic] The new chunk instance.
# File lib/chunky_png/chunk.rb, line 100 def self.read(type, content) self.new(type, content) end