Class: Styles::Properties::Color

Inherits:
Base
  • Object
show all
Defined in:
lib/styles/properties/color.rb

Instance Attribute Summary

Attributes inherited from Base

#name, #selector, #value

Instance Method Summary collapse

Methods inherited from Base

#colors, #initialize, multiple_names?, names, other_names, sub_engine, sub_engines, to_sym

Constructor Details

This class inherits a constructor from Styles::Properties::Base

Instance Method Details

#color_to_useObject



11
12
13
# File 'lib/styles/properties/color.rb', line 11

def color_to_use
  value == :none ? :no_fg_color : value
end

#valid_value?Boolean

Returns:

  • (Boolean)


6
7
8
9
# File 'lib/styles/properties/color.rb', line 6

def valid_value?
  return true if value == :none
  colors[value]
end