Class: ImageMosaic::Data::Background
- Inherits:
-
Object
- Object
- ImageMosaic::Data::Background
- Defined in:
- lib/image_mosaic/data/background.rb
Constant Summary collapse
- PATTERN =
/^#([0-9a-fA-F]{3}){1,2}$/
Instance Method Summary collapse
- #hex ⇒ Object
-
#initialize(hex) ⇒ Background
constructor
A new instance of Background.
Constructor Details
#initialize(hex) ⇒ Background
Returns a new instance of Background.
6 7 8 |
# File 'lib/image_mosaic/data/background.rb', line 6 def initialize(hex) @hex = hex end |
Instance Method Details
#hex ⇒ Object
10 11 12 |
# File 'lib/image_mosaic/data/background.rb', line 10 def hex valid? ? @hex : COLOUR end |