class Ruboty::Handlers::Aa

Public Instance Methods

aa(message) click to toggle source
# File lib/ruboty/aa.rb, line 26
def aa(message)
  word = message.match_data[1]
  if word && !word.empty?
    message.reply prefix + artii.asciify(word).chomp + suffix
  end
end
artii() click to toggle source
# File lib/ruboty/aa.rb, line 22
def artii
  @artii ||= Artii::Base.new(font: (ENV['AA_FONT'] || 'big'))
end
prefix() click to toggle source
# File lib/ruboty/aa.rb, line 13
def prefix
  ENV['AA_PREFIX'] ||= "```\n"
end
suffix() click to toggle source
# File lib/ruboty/aa.rb, line 17
def suffix
  ENV['AA_SUFFIX'] ||= "\n```"
end