Class: ChunkyPNG::Chunk::Generic

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

Direct Known Subclasses

ImageData, 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.



37
38
39
# File 'lib/chunky_png/chunk.rb', line 37

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

Instance Attribute Details

#contentObject

Returns the value of attribute content.



35
36
37
# File 'lib/chunky_png/chunk.rb', line 35

def content
  @content
end

Class Method Details

.read(type, content) ⇒ Object



41
42
43
# File 'lib/chunky_png/chunk.rb', line 41

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