Skip to content

Instantly share code, notes, and snippets.

@mtwilliams
Created September 27, 2015 01:04
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 mtwilliams/929fd01b3f7709766c35 to your computer and use it in GitHub Desktop.
Save mtwilliams/929fd01b3f7709766c35 to your computer and use it in GitHub Desktop.
class Foo
attr_reader :meaning_of_life,
:how_long_do_i_have,
def initialize(three_score_and_ten=70)
@meaning_of_life = 42
@how_long_do_i_have = three_score_and_ten
end
end
puts Foo.new.how_long_do_i_have
# => nil
@mtwilliams
Copy link
Author

- :how_long_do_i_have,
+ :how_long_do_i_have
puts Foo.new.how_long_do_i_have
 # => 70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment