Created
November 5, 2018 18:37
-
-
Save edezekiel/d450e3095f7c3bc9208496d319cbabea to your computer and use it in GitHub Desktop.
binding-pry-blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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