The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Matz Just Sent Me a Ruby Script From 2009

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Red Handed

Posts: 1158
Nickname: redhanded
Registered: Dec, 2004

Red Handed is a Ruby-focused group blog.
Matz Just Sent Me a Ruby Script From 2009 Posted: Nov 14, 2005 11:39 AM
Reply to this message Reply

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
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Red Handed
Latest Posts From RedHanded

Advertisement

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.

Read: Matz Just Sent Me a Ruby Script From 2009

Topic: Oh My... Previous Topic   Next Topic Topic: The Fear of Point C

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use