I’m using a gem called artii ( http://rubygems.org/gems/artii ) that creates ascii art images from text.
I can only seem to call it using system(), however I’d like to display the result as text in a webpage
My .rb file:
def makeText
@word = system('artii Hello World')
puts @word
@word
end
result of puts:
=> _ _ _ _
=> | | | | | | |
=> | |__| | ___| | | ___
=> | __ |/ _ \ | |/ _ \
=> | | | | __/ | | (_) |
=> |_| |_|\___|_|_|\___/
Then, in my haml file:
#{makeText}
=> true
Is there a way to take the result from the command line and convert it to a string, array, or hash to display in a webpage?
Thanks!