Class: Swatches::Colors

Inherits:
Object
  • Object
show all
Defined in:
lib/swatches/colors.rb

Class Method Summary collapse

Class Method Details

.each_color(&block) ⇒ Object



10
11
12
13
14
# File 'lib/swatches/colors.rb', line 10

def self.each_color(&block)
  Swatches.config.colors.each do |name, red, green, blue|
    block.call(name, red.to_i, green.to_i, blue.to_i)
  end
end

.namesObject



6
7
8
# File 'lib/swatches/colors.rb', line 6

def self.names
  Swatches.config.colors.map(&:first)
end