Twittershoes: programming in Shoes.rb

April 2, 2009 by pedro mota

I have to share this piece of code, wich results look indeed nice. You’ll see in the next blog post…\n\ndef string_alert\n  c = (LIMIT-@iSay.text.length)\n  @remaining.style :stroke => \"#3276BA\"\n  c > 10 ? (@remaining.style :stroke => orange) : (@remaining.style :stroke => red) if (c < 21)\n  c > 0 ? \"#{c.to_s} chars\" : \"Too Long!\"\nend\n\n\n[update]: Twittershoes.rb is born: screenshot here

© 2018 | Follow on Twitter | pedro mg & Hugo