Module: Bitmapped::Validators::ValidationHelper

Defined in:
lib/bitmapped/validators/validation_helper.rb

Constant Summary collapse

ALPHABET =
[*'A'..'Z']

Class Method Summary collapse

Class Method Details

.parse_color(color) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/bitmapped/validators/validation_helper.rb', line 10

def parse_color(color)
  color = color.strip
  if ALPHABET.include?(color)
    color
  else
    raise ParsingError
  end
end