Skip to content

Instantly share code, notes, and snippets.

@psahni
Created June 1, 2011 14:02
Show Gist options
  • Save psahni/1002343 to your computer and use it in GitHub Desktop.
Save psahni/1002343 to your computer and use it in GitHub Desktop.
Breakpoint
#gem install 'ruby-breakpoint'
require 'rubygems'
require 'breakpoint'
class Person
def initialize(name, age)
@name, @age = name, age
breakpoint("Person#initialize")
end
attr_reader :age
def name
breakpoint("Person#name") { @name }
end
end
person = Person.new("Random Person", 23)
puts "Name: #{person.name}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment