Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
75 lines (48 sloc) 1.62 KB

#yo: Street-oriented programming in Ruby

Shake those classes baby! Have you ever felt like bored after you wrote a snippet like this?

class Person
  attr_accessor :name, :age, :mood, :money

Just gem install yo or put gem 'yo' in your Gemfile, put your badass face and type this:

require 'yo'

class Person
  extend Yo

  so i think it goes like this

  defnly he shud have an accessor 'name'
  a person also has a property 'age', yeah

  ya should know he has some freakin 'money', too
  prolly he demands some privacy on da 'money', yo

  he might as well have a pretty badass 'mood'
  but you never know inthis neighborhood

  but hey maybe its all bullshit, so
  we better get going bro

  shake it baby, yeah


You can check it's all flawlessly working:

john = = "John" # => "John"

john.age = 29
john.age # => 29 = "$3" # => "$3"

john.mood = :badass
john.mood # => :badass

Now that's some street-oriented programming!


gem install yo

... or if you use Bundler:

gem 'yo'


  • Fork the project.
  • Make your feature addition or bug fix.
  • Add specs for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. If you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull.
  • Send me a pull request. Bonus points for topic branches.


Copyright (c) 2011 Josep M. Bach. See LICENSE for details.