Last active
August 29, 2015 14:00
-
-
Save hardbap/c1e9281004522c2ae38e to your computer and use it in GitHub Desktop.
Example code from https://www.youtube.com/watch?v=SxHqhDT9WGI
This file contains hidden or 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
class Account | |
attr_reader :account_id, :initial_balance | |
initialize(account_id, initial_balance) | |
@account_id = account_id | |
@initial_balance = initial_balance | |
end | |
end | |
class SavingsAccount < Account | |
def initialize(account_id, initial_balance) | |
super(account_id, initial_balance) | |
end | |
private :initialize | |
# some methods | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment