Class: Thermal::EscposStar::Buffer

Inherits:
ByteBuffer show all
Defined in:
lib/thermal/escpos_star/buffer.rb

Instance Method Summary collapse

Methods inherited from ByteBuffer

#<<, #buffer, #flush, #flush_base64, #to_a, #to_base64, #to_s

Constructor Details

#initializeBuffer

Returns a new instance of Buffer.



6
7
8
9
# File 'lib/thermal/escpos_star/buffer.rb', line 6

def initialize
  super
  init_buffer!
end

Instance Method Details

#write_text(text, replace: nil, **_kwargs) ⇒ Object



11
12
13
14
# File 'lib/thermal/escpos_star/buffer.rb', line 11

def write_text(text, replace: nil, **_kwargs)
  text = ::Thermal::Util.normalize_utf8(text, replace: replace)
  write(text) if text
end