Class: Flonkerton::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/flonkerton.rb

Overview

This class shouldn’t be used directly, it provides behavior for subclasses.

Direct Known Subclasses

Fonts, Images, Samples, Songs, Tiles

Class Method Summary collapse

Class Method Details

.[](key) ⇒ Object



80
81
82
# File 'lib/flonkerton.rb', line 80

def self.[](key)
  all[key]
end

.allObject



76
77
78
# File 'lib/flonkerton.rb', line 76

def self.all
  @hash ||= Hash.new
end

.load(game) ⇒ Object



70
71
72
73
74
# File 'lib/flonkerton.rb', line 70

def self.load(game)
  Dir[path].each do |file|
    all[File.label(file)] = klass.new(game, file)
  end
end