Skip to content

Commit

Permalink
Fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
retro committed Oct 1, 2010
1 parent 337a6a3 commit e5ba1bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/color_namer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ def name_from_html_hash(hash)
end

def name_from_rgb(*rgb)
rgb = rgb[0].split(',').map{ |v| v.strip } if rgb.size == 1
raise ArgumentError, "Wrong format of RGB value. Use 'r,g,b' or [r,g,b]" if rgb.size < 3
rgb = rgb[0].split(',').map(&:strip) if rgb.size == 1
raise ArgumentError, "Wrong format of RGB value. Use 'r,g,b' or r,g,b" if rgb.size < 3
rgb.map!(&:to_i)
color = Color::RGB.new(rgb[0], rgb[1], rgb[2])
name(color)
Expand Down

0 comments on commit e5ba1bd

Please sign in to comment.