Class: Brut::FrontEnd::Forms::Input::Color
- Inherits:
-
Object
- Object
- Brut::FrontEnd::Forms::Input::Color
- Defined in:
- lib/brut/front_end/forms/input.rb
Class Method Summary collapse
Class Method Details
.from_hex_string(string) ⇒ Object
273 274 275 276 277 278 279 280 |
# File 'lib/brut/front_end/forms/input.rb', line 273 def self.from_hex_string(string) string = string.to_s if string.match?(/\A#[0-9a-fA-F]{6}\z/) string.downcase else nil end end |