class Faker::Internet::HTTP
def status_code(group: nil)
-
(Integer)
-
def status_code(group: nil) return STATUS_CODES[STATUS_CODES_GROUPS.sample].sample unless group raise ArgumentError, 'Invalid HTTP status code group' unless STATUS_CODES_GROUPS.include?(group) STATUS_CODES[group].sample end