Created
June 10, 2013 21:30
-
-
Save evizitei/5752507 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 Car | |
def initialize(instruments) | |
@instruments = instruments | |
end | |
def mileage | |
@_mileage ||= @instruments.select(:odometer).calculate_value | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment