Skip to content

Instantly share code, notes, and snippets.

@jorgemanrubia
Created January 15, 2023 21:15
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 jorgemanrubia/39a9bc011a5803c56ad6a1f1c230019b to your computer and use it in GitHub Desktop.
Save jorgemanrubia/39a9bc011a5803c56ad6a1f1c230019b to your computer and use it in GitHub Desktop.
ChatGPT prompt 6
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
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