Class: Cat::Style::Fill

Inherits:
Object
  • Object
show all
Defined in:
lib/cat/style/fill.rb

Instance Method Summary collapse

Constructor Details

#initialize(color) ⇒ Fill

Returns a new instance of Fill.



4
5
6
7
# File 'lib/cat/style/fill.rb', line 4

def initialize(color)
  @color = color
  @color = "black" unless (color =~ /^\$|#|rgb/) >= 0
end

Instance Method Details

#to_sObject



9
10
11
# File 'lib/cat/style/fill.rb', line 9

def to_s
  "background: #{@color};"
end