Created
November 11, 2015 19:40
-
-
Save jamiehodge/68389548d9a86febce89 to your computer and use it in GitHub Desktop.
Private readers
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
class Foo | |
attr_reader :bar | |
def initialize(bar:, baz:) | |
@bar = bar | |
@baz = baz | |
end | |
def to_h | |
{ bar: bar, baz: baz } | |
end | |
private | |
attr_reader :baz | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment