Module: Charming::Image::Protocol

Defined in:
lib/charming/image/protocol.rb,
lib/charming/image/protocol/kitty.rb

Overview

Protocol namespaces the terminal-graphics encoders and dispatches to one by name. Each encoder (e.g. Kitty) exposes the same surface — transmit(...) for the out-of-band payload and placeholder_block(...) for the in-frame cells — so Source stays protocol-agnostic.

Defined Under Namespace

Modules: Kitty

Class Method Summary collapse

Class Method Details

.for(name) ⇒ Object

Returns the encoder module for name (a Terminal#protocol symbol), or nil when no encoder applies (e.g. :none).



11
12
13
14
15
# File 'lib/charming/image/protocol.rb', line 11

def self.for(name)
  case name
  when :kitty then Kitty
  end
end