Class: Spectra::Palette
- Defined in:
- lib/spectra/views/palette.rb
Instance Attribute Summary
Attributes inherited from View
Instance Method Summary collapse
Methods inherited from View
#format_color_name, #format_color_value, from_attributes, #initialize, #render, template_name, #to_s, #views_from_colors
Methods included from Serializable
#destination, #serialize, #write_file
Constructor Details
This class inherits a constructor from Spectra::View
Instance Method Details
#directory ⇒ Object
Pathing
16 17 18 |
# File 'lib/spectra/views/palette.rb', line 16 def directory @directory || "#{Dir.home}/Library/Colors/" end |
#filename ⇒ Object
20 21 22 |
# File 'lib/spectra/views/palette.rb', line 20 def filename super || "#{self.prefix}-palette.clr" end |
#renamer ⇒ Object
8 9 10 |
# File 'lib/spectra/views/palette.rb', line 8 def renamer @renamer || lambda { |color, prefix| color.name.camelize(true) + color.suffix } end |