Just for the record, who haven’t met yet with
StringInquirer. Its owing to
StringInquirer that we are able to call
Rails.env.production? instead of
Rails.env == 'production'. Since
Rails.env returns the value wrappped within
method_missing to respond to all of the
predicate methods called on it, validating that if any of the value in
ArrayInquirer object equals name of the predicate method.
ArrayInquirer also overrides
any? method, accepting arguments and returning corresponding
boolean based on if any of the value in arguments is present in
For the curious audience out there, put on your diving shoes and jump into rails source code to get a more crisp picture of how
ArrayInquirer actually works.