Skip to content

Instantly share code, notes, and snippets.

@hardbap
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hardbap/c1e9281004522c2ae38e to your computer and use it in GitHub Desktop.
Save hardbap/c1e9281004522c2ae38e to your computer and use it in GitHub Desktop.
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