Class: ChunkyPNG::Chunk::Generic

Inherits:
Base
  • Object
show all
Defined in:
lib/chunky_png/chunk.rb

Direct Known Subclasses

ImageData, InternationalText, Palette, Transparency

Instance Attribute Summary collapse

Attributes inherited from Base

#type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#write, #write_with_crc

Constructor Details

#initialize(type, content = '') ⇒ Generic

Returns a new instance of Generic.



62
63
64
# File 'lib/chunky_png/chunk.rb', line 62

def initialize(type, content = '')
  super(type, :content => content)
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



60
61
62
# File 'lib/chunky_png/chunk.rb', line 60

def content
  @content
end

Class Method Details

.read(type, content) ⇒ Object



66
67
68
# File 'lib/chunky_png/chunk.rb', line 66

def self.read(type, content)
  self.new(type, content)
end