Class: RubyFiglet::Parser

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

Instance Method Summary collapse

Constructor Details

#initialize(font) ⇒ Parser

Returns a new instance of Parser.



27
28
29
30
31
32
33
# File 'lib/ruby_figlet/parser.rb', line 27

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_tableObject



117
118
119
120
121
122
123
124
125
# File 'lib/ruby_figlet/parser.rb', line 117

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