Skip to content

Instantly share code, notes, and snippets.

@edezekiel
Created November 5, 2018 18:37
Show Gist options
  • Save edezekiel/d450e3095f7c3bc9208496d319cbabea to your computer and use it in GitHub Desktop.
Save edezekiel/d450e3095f7c3bc9208496d319cbabea to your computer and use it in GitHub Desktop.
binding-pry-blog
require 'pry'
class Car
def initialize
@classification = "A Car"
binding.pry
end
def describe
"I am #{@classification}, of make #{@make}"
binding.pry
end
end
class Honda < Car
def initialize
@make = "Honda"
binding.pry
super
end
end
honda = Honda.new
honda.describe # => "I am , of make Honda"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment