Class: ZIMG::PNG::Chunk::TEXT

Inherits:
TextChunk show all
Defined in:
lib/zimg/png/text_chunks.rb

Constant Summary

Constants inherited from TextChunk

TextChunk::INTEGER_CLASS

Constants inherited from ZIMG::PNG::Chunk

KNOWN_TYPES, VALID_SIZE_RANGE

Instance Attribute Summary

Attributes inherited from TextChunk

#keyword, #text

Attributes inherited from ZIMG::PNG::Chunk

#crc, #data, #idx, #offset, #size, #type

Instance Method Summary collapse

Methods inherited from TextChunk

#inspect, #to_hash

Methods inherited from ZIMG::PNG::Chunk

#check, #crc_ok?, #export, #export_data, #fix_crc!, from_stream, #inspect, #valid?

Methods included from DeepCopyable

#deep_copy

Methods inherited from Chunk

#cli_color

Constructor Details

#initialize(*args) ⇒ TEXT

Returns a new instance of TEXT.



36
37
38
39
# File 'lib/zimg/png/text_chunks.rb', line 36

def initialize *args
  super
  @keyword, @text = data.unpack("Z*a*")
end