Skip to content
This repository has been archived by the owner on Dec 24, 2022. It is now read-only.

Better way to test for color #14

Open
v0dro opened this issue Jul 23, 2018 · 0 comments
Open

Better way to test for color #14

v0dro opened this issue Jul 23, 2018 · 0 comments

Comments

@v0dro
Copy link
Collaborator

v0dro commented Jul 23, 2018

@bar_color = COLOR_INDEX[marker_color] if @bar_color.is_a? Symbol

A better way would be check would be to see if a key is actually present in the hash. Like
... if COLOR_INDEX.has_key?(marker)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant