Method: Punk::Vampire.make

Defined in:
lib/punkmaker/type/vampire.rb

.make(color = nil, gender: 'm') ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/punkmaker/type/vampire.rb', line 9

def self.make( color=nil,
                 gender: 'm'  )
  base =   gender == 'm' ? BASE_M : BASE_F

  ## note: make a copy of base 

  punk = Image.new( base.width, base.height )  
  punk.compose!( base )
  
  if color    
    color_map = derive_color_map( color )  
    punk = punk.change_colors( color_map )
  end

  punk
end