class Faker::LoremFlickr
def grayscale_image(legacy_size = NOT_GIVEN, legacy_search_terms = NOT_GIVEN, legacy_match_all = NOT_GIVEN, size: '300x300', search_terms: ['all'], match_all: false)
-
(String)
-
Parameters:
-
match_all
(Boolean
) -- Add "all" as part of the URL. -
search_terms
(Array
) -- Adds search terms to the image URL. -
size
(String
) -- Specifies the size of image to generate.
def grayscale_image(legacy_size = NOT_GIVEN, legacy_search_terms = NOT_GIVEN, legacy_match_all = NOT_GIVEN, size: '300x300', search_terms: ['all'], match_all: false) warn_for_deprecated_arguments do |keywords| keywords << :size if legacy_size != NOT_GIVEN keywords << :search_terms if legacy_search_terms != NOT_GIVEN keywords << :match_all if legacy_match_all != NOT_GIVEN end raise ArgumentError, 'Search terms must be specified for grayscale images' unless search_terms.any? build_url(size, 'g', search_terms, match_all) end