Class: Pompom::Asciifier

Inherits:
Object
  • Object
show all
Defined in:
lib/pompom.rb

Instance Method Summary collapse

Constructor Details

#initializeAsciifier

Returns a new instance of Asciifier.



180
181
182
# File 'lib/pompom.rb', line 180

def initialize
  @asciifier = Artii::Base.new
end

Instance Method Details

#asciify(text) ⇒ Object



184
185
186
187
188
189
190
# File 'lib/pompom.rb', line 184

def asciify(text)
  result = @asciifier.asciify(text).split("\n")
  # Fix kerning for when 2nd character of minutes is a 4. This fix
  # should really be moved back upstream to the figlet font.
  result[3].sub!(/_\| /, '_|')
  result.join("\n")
end