Method: Gitlab::CLI::Helpers.hex_color?
- Defined in:
- lib/gitlab/cli_helpers.rb
.hex_color?(arg) ⇒ Boolean
Check if arg is a color in 6-digit hex notation with leading ‘#’ sign
231 232 233 234 235 |
# File 'lib/gitlab/cli_helpers.rb', line 231 def hex_color?(arg) pattern = /\A#\h{6}\Z/ pattern.match(arg) end |