Class: KeepYourHead::Images
- Inherits:
-
Object
- Object
- KeepYourHead::Images
- Defined in:
- lib/Keepyourhead/Images.rb
Class Method Summary collapse
- .fromCacheItem(type, cacheItem) ⇒ Object
- .fromCompilation(type, compilation) ⇒ Object
- .imageError(type) ⇒ Object
- .imageLoading(type) ⇒ Object
- .typeToName(type) ⇒ Object
Class Method Details
.fromCacheItem(type, cacheItem) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/Keepyourhead/Images.rb', line 37 def self.fromCacheItem( type, cacheItem) if cacheItem then if cacheItem.success then cacheItem.filenames else imageError type end else imageLoading type end end |
.fromCompilation(type, compilation) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/Keepyourhead/Images.rb', line 49 def self.fromCompilation( type, compilation) if compilation then if compilation.success then compilation.filenames else imageError type end else imageError type end end |
.imageError(type) ⇒ Object
30 31 32 |
# File 'lib/Keepyourhead/Images.rb', line 30 def self.imageError(type) [Resources::system("images/error_#{typeToName(type)}.png")] end |