Skip to content

Commit

Permalink
Use Hash#key instead of Hash#index
Browse files Browse the repository at this point in the history
  • Loading branch information
Micah Werbitt authored and joshuaclayton committed Jul 23, 2011
1 parent e8235f6 commit b17f6bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/palette/color.rb
Expand Up @@ -13,7 +13,7 @@ def to_hex
end end


def to_cterm def to_cterm
self.class.color_map.index(closest_cterm_hex) self.class.color_map.key(closest_cterm_hex)
end end


private private
Expand Down

0 comments on commit b17f6bc

Please sign in to comment.