Class: Vimdeck::Ascii

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

Overview

Helper methods for ascii art conversion

Class Method Summary collapse

Class Method Details

.header(text, type) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/vimdeck.rb', line 11

def self.header(text, type)
  if type == "large"
    font = Artii::Base.new :font => 'slant'
  else
    font = Artii::Base.new :font => 'smslant'
  end

  font.asciify(text)
end

.image(img) ⇒ Object



21
22
23
24
# File 'lib/vimdeck.rb', line 21

def self.image(img)
  a = AsciiArt.new(img)
  a.to_ascii_art width: 30
end