Last active
February 27, 2018 21:48
-
-
Save brixen/4404d4a1d2e6682a0cf283d13cedf2bd to your computer and use it in GitHub Desktop.
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 A | |
attr_accessor :things | |
def initialize | |
@things = [] | |
end | |
def compute | |
things.each do |x| | |
x.compute | |
end | |
end | |
def result | |
x = compute | |
# do something with x | |
x | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment