This post originated from an RSS feed registered with Ruby Buzz
by Red Handed.
Original Post: Matz Just Sent Me a Ruby Script From 2009
Feed Title: RedHanded
Feed URL: http://redhanded.hobix.com/index.xml
Feed Description: sneaking Ruby through the system
It suddenly toppled through this DRb port I just opened! An Object with an @author, @timestamp and @message. I can’t verify the authenticity. The message is:
Tumblemail -> ActiveRecord Base
belongs to: User
has: content -> Link (or) Quote (or) IRC Log (or) Flickr Photo
has: Recipient(s)
validates presence of: User ID, Creation Time
and format of: Reply To with: /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/
also, uniqueness and existence of: URL
::find popular -> |n = 10|
<- find: all,
order by: Replies,
limit: 0, 10
.check status
? .sent (and) .finished <- "Finished"
? .sent <- "Sending"
? .ready <- "Still in draft"
;;
;;
.friendly replies
<- replies.sender.every.friendly?
.percentage who replied
<- * 100 <- replies.count / sent.to_f
.inspect
<- #>
;;
He also sent a short follow-up: “Everything is a class.” Which scared the bejesus out of me and I freaked out and ran straight into the wall of my sock closet.