Sha256: 75d97647d96baff441595fdc50e1be58479c20e00695d9ad195c8f630afc79b2
Contents?: true
Size: 496 Bytes
Versions: 25
Compression:
Stored size: 496 Bytes
Contents
# Extend Array to provide following features: # - creates SuperHash for hashes # - creates SuperArray for arrays # ------------------------------- # class CityGrid module Abstraction class SuperArray < Array def self.new objs array = self.[] *objs array.map! do |obj| if obj.class == Hash SuperHash.new obj elsif obj.class == Array new obj else obj end end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems