Class: ChunkyPNG::Chunk::Generic
Overview
The Generic chunk type will read the content from the chunk as it, and will write it back as it was read.
Direct Known Subclasses
Instance Attribute Summary (collapse)
-
- (Object) content
The attribute to store the content from the chunk, which gets written by the write method.
Attributes inherited from Base
Class Method Summary (collapse)
-
+ (ChunkyPNG::Chunk::Generic) read(type, content)
Creates an instance, given the chunk's type and content.
Instance Method Summary (collapse)
-
- (Generic) initialize(type, content = '')
constructor
A new instance of Generic.
Methods inherited from Base
Constructor Details
- (Generic) initialize(type, content = '')
A new instance of Generic
92 93 94 |
# File 'lib/chunky_png/chunk.rb', line 92 def initialize(type, content = '') super(type, :content => content) end |
Instance Attribute Details
- (Object) content
The attribute to store the content from the chunk, which gets written by the write method.
89 90 91 |
# File 'lib/chunky_png/chunk.rb', line 89 def content @content end |
Class Method Details
+ (ChunkyPNG::Chunk::Generic) read(type, content)
Creates an instance, given the chunk's type and content.
100 101 102 |
# File 'lib/chunky_png/chunk.rb', line 100 def self.read(type, content) self.new(type, content) end |