what kind of blog are you?
I've written a bit of Ruby code that uses method missing to help you determine the type of blog given a url. So you can do something like: blog_url = BlogUrl.new('http://thegiggleloop.blogspot.com') if blog_url.blogger? #do something for a blogger blog elsif blog_url.whatever? #do whatever end This is the first thing I've written that I really feel takes advantage of Ruby. Up until now I've felt like I've just been writing Java code in Ruby.
0 Comments:
Post a Comment
<< Home