Method: Punk::Hair::Maker#make

Defined in:
lib/punkmaker/hair.rb

#make(style, color: 'black') ⇒ Object

change name to colorize - why? why not?



83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/punkmaker/hair.rb', line 83

def make( style, color: 'black' )   ## change name to colorize - why? why not?
    ## pass-through  shavedhead (no colors - alpha only) - why? why not?
    hair = @sheet.find_by( name: style )
    if hair.nil?
      puts "!! ERROR - unknow hair style >#{style}<; sorry"
      exit 1
    end
     
    color = parse_hair_color( color )

    color_map = Hair.derive_color_map( color )
    hair.change_colors( color_map )
end