Class: CssColorContrast::CommandInterpreter::Function::Info
- Inherits:
-
CssColorContrast::CommandInterpreter::Function
- Object
- CssColorContrast::CommandInterpreter::Function
- CssColorContrast::CommandInterpreter::Function::Info
- Defined in:
- lib/css_color_contrast/command_interpreter.rb
Instance Attribute Summary
Attributes inherited from CssColorContrast::CommandInterpreter::Function
Instance Method Summary collapse
Methods inherited from CssColorContrast::CommandInterpreter::Function
create, #initialize, #param_values, #push
Constructor Details
This class inherits a constructor from CssColorContrast::CommandInterpreter::Function
Instance Method Details
#evaluate ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/css_color_contrast/command_interpreter.rb', line 81 def evaluate colors = param_values.map {|c| Color.as_color(c) } out = StringIO.new colors.each do |c| out.puts '---' out.puts labeled_rgb_values(c) out.puts format_color_function(:hsl, c.hsl) out.puts format_color_function(:hwb, c.hwb) end out.string end |