Brian's Waste of Time

Mon, 10 Apr 2006

Metaprogramming All Over!

So, Martin released a first showing at his wicked cool Atom binding library for ruby:

require 'atom'
require 'net/http'
require 'uri'

str = Net::HTTP::get(URI::parse(''))
feed =

feed.entries.each { |entry|
  puts "'#{entry.title}' by #{}"

I like this example more, though ;-)

Meanwhile, Obie apparently leaked ActiveMessagingM-Del a13g. Woot! It's good to see Stomp getting wider usage.

class HelloWorldProcessor < ActiveMessaging::Processor
 subscribes_to :hello_world
 publishes_to :hello_world
 def on_message(message)
   puts "received: " + message.body
   publish :message => "Hello world!"

Cool stuff all around!

0 writebacks [/src/ruby] permanent link