-
-
Save jorgemanrubia/39a9bc011a5803c56ad6a1f1c230019b to your computer and use it in GitHub Desktop.
ChatGPT prompt 6
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 Bar | |
attr_accessor :time, :open, :high, :low, :close, :volume | |
def initialize(time:, open:, high:, low:, close:, volume:) | |
@time = time | |
@open = open | |
@high = high | |
@low = low | |
@close = close | |
@volume = volume | |
end | |
end |
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
please change the bar class to be immutable and use named params |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment