Skip to content

Instantly share code, notes, and snippets.

@jasonnoble
Created March 6, 2016 20:45
Show Gist options
  • Select an option

  • Save jasonnoble/8e78eb6d867f34aa31e5 to your computer and use it in GitHub Desktop.

Select an option

Save jasonnoble/8e78eb6d867f34aa31e5 to your computer and use it in GitHub Desktop.
attr_reader :balance
# is equivalent to
# def balance
# @balance
# end
attr_writer :balance
# is equivalent to
# def balance=(value)
# @balance = value
# end
attr_accessor :balance
# is equivalent to
# def balance
# @balance
# end
#
# def balance=(value)
# @balance = value
# end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment