Skip to content

Instantly share code, notes, and snippets.

@oldfartdeveloper
Created June 22, 2013 18:29
Show Gist options
  • Select an option

  • Save oldfartdeveloper/5842002 to your computer and use it in GitHub Desktop.

Select an option

Save oldfartdeveloper/5842002 to your computer and use it in GitHub Desktop.
A simple Ruby structure for experimenting with classes and definitions without having to retype them in (as in `irb`).

Use this as a template from your favorite editer/IDE. Simple replace the comment in the #execute method with your experiment.

class DirtyHarry

  def execute

    # Feeling lucky, punk?

  end

end

dh = DirtyHarry.new

puts dh.execute.inspect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment