Module: Rixmap::Format::PNG::Chunk
- Defined in:
- lib/rixmap/format/png/chunk.rb
Overview
PNGチャンクデータモジュール
Defined Under Namespace
Classes: BaseChunk, IDATChunk, IENDChunk, IHDRChunk, PLTEChunk
Class Method Summary collapse
-
.get(name) ⇒ Class?
チャンクタイプ名からその実装クラスを取得します.
-
.set(name, klass) ⇒ void
チャンクタイプ名と実装クラスの対応を登録します.
Class Method Details
.get(name) ⇒ Class?
チャンクタイプ名からその実装クラスを取得します.
27 28 29 30 31 32 |
# File 'lib/rixmap/format/png/chunk.rb', line 27 def self.get(name) unless defined?(@chunks) @chunks = Hash.new end return @chunks[name] end |
.set(name, klass) ⇒ void
This method returns an undefined value.
チャンクタイプ名と実装クラスの対応を登録します.
16 17 18 19 20 21 |
# File 'lib/rixmap/format/png/chunk.rb', line 16 def self.set(name, klass) unless defined?(@chunks) @chunks = Hash.new end @chunks[name] = klass end |