Sha256: 7bdcb5f1b39210f03729b85f2e73276be14d72957472e40983dc4eebe87ab63a
Contents?: true
Size: 638 Bytes
Versions: 3
Compression:
Stored size: 638 Bytes
Contents
#:enddoc: module RailsConnector class ObjClass < CmsBaseModel def self.by_name(name) obj_class_cache[name] end def self.reset_cache @obj_class_cache = nil end def name obj_class_name end def has_attribute?(name) @custom_attribute_names ||= custom_attributes.map(&:name) @custom_attribute_names.include?(name.to_s) end module ClassMethods private def obj_class_cache @obj_class_cache ||= find(:all).each_with_object({}) do |objclass, map| map[objclass.name] = objclass end end end extend ClassMethods end end
Version data entries
3 entries across 3 versions & 1 rubygems