Skip to content

Instantly share code, notes, and snippets.

@tigawa
Last active December 11, 2015 19:08
Show Gist options
  • Save tigawa/4645992 to your computer and use it in GitHub Desktop.
Save tigawa/4645992 to your computer and use it in GitHub Desktop.
ruby setter/getter
class Greeter
attr_accessor :name #getter/setter
attr_reader :greeting #getter
attr_writer :age #setter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment