class TTY::Font::Result

Represents font rendering result. It provides more convenient interface for using the output.

Public Class Methods

new() click to toggle source
# File lib/tty/font/result.rb, line 10
def initialize
  @output = []
end

Public Instance Methods

<<(line)
Alias for: add
add(line) click to toggle source
# File lib/tty/font/result.rb, line 19
def add(line)
  @output << line
end
Also aliased as: <<
each(&block) click to toggle source
# File lib/tty/font/result.rb, line 14
def each(&block)
  return to_enum(:each) unless block
  @output.each(&block)
end
lines() click to toggle source
# File lib/tty/font/result.rb, line 24
def lines
  @output
end
to_s() click to toggle source
# File lib/tty/font/result.rb, line 28
def to_s
  @output.join("\n")
end