Class: Spectra::SwiftExtension

Inherits:
View
  • Object
show all
Defined in:
lib/spectra/views/swift_extension.rb

Instance Attribute Summary

Attributes inherited from View

#colors, #prefix

Attributes included from Serializable

#directory

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

#filenameObject

Pathing



16
17
18
# File 'lib/spectra/views/swift_extension.rb', line 16

def filename
  super || 'Colors.swift' 
end

#renamerObject



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