Class: Thermal::EscposStar::Buffer
- Inherits:
-
ByteBuffer
- Object
- ByteBuffer
- Thermal::EscposStar::Buffer
- Defined in:
- lib/thermal/escpos_star/buffer.rb
Instance Method Summary collapse
-
#initialize ⇒ Buffer
constructor
A new instance of Buffer.
- #write_text(text, replace: nil, **_kwargs) ⇒ Object
Methods inherited from ByteBuffer
#<<, #buffer, #flush, #flush_base64, #to_a, #to_base64, #to_s
Constructor Details
#initialize ⇒ Buffer
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 |