| Class | ChunkyPNG::Chunk::Generic |
| In: |
lib/chunky_png/chunk.rb
|
| Parent: | Base |
| content | [RW] | The attribute to store the content from the chunk, which gets written by the write method. |
# File lib/chunky_png/chunk.rb, line 92
92: def initialize(type, content = '')
93: super(type, :content => content)
94: end
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
100: def self.read(type, content)
101: self.new(type, content)
102: end