Could you tell me what the question mark means again?


#1



Could you tell me what the ? mark means again?

https://www.codecademy.com/en/courses/ruby-beginner-en-MFiQ6/1/5?curriculum_id=5059f8619189a5000201fbcb


def create_record(attributes, raise_error = false)
  record = build_record(attributes)
  yield(record) if block_given?
  saved = record.save
  set_new_record(record)
  raise RecordInvalid.new(record) if !saved && raise_error
  record
end


#2

It doesn't really mean anything. It's a convention (which you should use).
Some functions end in a question mark, and by convention this means that the function will return a boolean (true or false).

I see most of these functions as actually giving an answer to a true or false question.