Class: Saudi::Image

Inherits:
Pixelart::Image
  • Object
show all
Defined in:
lib/punks/saudis.rb

Constant Summary collapse

NA =

note: remove/delete empyty attributes (n/a - not applicables)

    (e.g. "None" in Eyewear/Mouse Prop and
          "Clean Shaven" in Beard )
future:  make n/a values configurable that you can pass in
          e.g.   nas: [] or such - why? why not?
[
  'cleanshaven',
  'none'
]
NAMES =
['saudi', 'saudis',
'sheik', 'sheiks']
DEFAULT_ATTRIBUTES =
['Male 05', 'White Shemagh']

Class Method Summary collapse

Class Method Details

.generate(*names) ⇒ Object



44
45
46
47
48
# File 'lib/punks/saudis.rb', line 44

def self.generate( *names )
  names = names.filter { |name| !NA.include?( Pixelart::Spritesheet.normalize_key( name )) }

  generator.generate( *names )
end

.generatorObject



23
24
25
26
# File 'lib/punks/saudis.rb', line 23

def self.generator
  @generator ||= Artfactory.use( Saudi::Sheet.builtin,
                                 image_class: Image )
end