Class: Vimdeck::Ascii
- Inherits:
-
Object
- Object
- Vimdeck::Ascii
- Defined in:
- lib/vimdeck.rb
Overview
Helper methods for ascii art conversion
Class Method Summary collapse
Class Method Details
.header(text, type) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/vimdeck.rb', line 13 def self.header(text, type) if font_name = Vimdeck::Slideshow.[:header_font] begin font = Artii::Base.new :font => font_name rescue raise "Incorrect figlet font name" end else if type == "large" font = Artii::Base.new :font => 'slant' else font = Artii::Base.new :font => 'smslant' end end font.asciify(text) end |
.image(img) ⇒ Object
31 32 33 34 |
# File 'lib/vimdeck.rb', line 31 def self.image(img) a = AsciiArt.new(img) a.to_ascii_art width: 30 end |