Class: ColorConversion::RgbStringConverter
- Inherits:
-
ColorConverter
- Object
- ColorConverter
- ColorConversion::RgbStringConverter
- Defined in:
- lib/color_conversion/converters/rgb_string_converter.rb
Instance Attribute Summary
Attributes inherited from ColorConverter
Class Method Summary collapse
Methods inherited from ColorConverter
#alpha, #cmyk, factory, #hex, #hsb, #hsl, #hsv, inherited, #initialize, #name, #rgb
Constructor Details
This class inherits a constructor from ColorConversion::ColorConverter
Class Method Details
.matches?(color) ⇒ Boolean
4 5 6 7 8 |
# File 'lib/color_conversion/converters/rgb_string_converter.rb', line 4 def self.matches?(color) return false unless color.kind_of?(String) color.include?("rgb(") || color.include?("rgba(") end |