Class: Spectra::SwiftExtension
- Defined in:
- lib/spectra/views/swift_extension.rb
Instance Attribute Summary
Attributes inherited from View
Attributes included from Serializable
Instance Method Summary collapse
-
#filename ⇒ Object
Pathing.
- #renamer ⇒ Object
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
#filename ⇒ Object
Pathing
16 17 18 |
# File 'lib/spectra/views/swift_extension.rb', line 16 def filename super || 'Colors.swift' end |
#renamer ⇒ Object
8 9 10 |
# File 'lib/spectra/views/swift_extension.rb', line 8 def renamer @renamer || lambda { |color, prefix| color.name.camelize(true) + color.suffix } end |