Skip to content

Commit

Permalink
Fillmurray image Fixnum match issue (#824)
Browse files Browse the repository at this point in the history
Closes #823
  • Loading branch information
SagareGanesh authored and stympy committed Feb 8, 2017
1 parent f9b5400 commit cad3be3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/faker/fillmurray.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ class Fillmurray < Base
class << self

def image(grayscale = false, width = 200, height = 200)
raise ArgumentError, "Width should be a number" unless width.match(/^\d+$/)
raise ArgumentError, "Height should be a number" unless height.match(/^\d+$/)
raise ArgumentError, "Width should be a number" unless width.to_s.match(/^\d+$/)
raise ArgumentError, "Height should be a number" unless height.to_s.match(/^\d+$/)
raise ArgumentError, "Grayscale should be a boolean" unless [true, false].include?(grayscale)

grayscale == true ? "https://fillmurray.com/g/#{width}/#{height}" : "https://fillmurray.com/#{width}/#{height}"
Expand Down

0 comments on commit cad3be3

Please sign in to comment.