Class: FigFont::Figlet

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

Instance Method Summary collapse

Constructor Details

#initialize(font) ⇒ Figlet

Returns a new instance of Figlet.



21
22
23
24
25
26
27
# File 'lib/ruby_figlet/parser.rb', line 21

def initialize font
  unless Dir.entries("#{WD}/fonts").include? "#{font}.flf"
    puts "Font not found!"
    exit 1
  end
  @fontName = font
end

Instance Method Details

#font_dataObject



111
112
113
114
115
116
117
118
119
# File 'lib/ruby_figlet/parser.rb', line 111

def font_data
  {
    'lookup_table': scan,
    'height': @height,
    'direction': @print_way,
    'old_layout': @old_lay,
    'full_layout': @full_lay
  }
end