Sha256: 4a7d17014711d3b6121c53fb6c80f7d60822080ba9bbb81d9a2cc9c4f97ad686
Contents?: true
Size: 506 Bytes
Versions: 12
Compression:
Stored size: 506 Bytes
Contents
class Onceover class Class @@all = [] attr_accessor :name def initialize(name) @name = name @@all << self end def self.find(class_name) @@all.each do |cls| if class_name.is_a?(Onceover::Class) if cls = class_name return cls end elsif cls.name == class_name return cls end end logger.warn "Class #{class_name} not found" nil end def self.all @@all end end end
Version data entries
12 entries across 12 versions & 1 rubygems