Sha256: 22c8d7235b15ef04434980ba5b4b628391bf8c5ad81213f704b5f0f9cd8cff06
Contents?: true
Size: 415 Bytes
Versions: 13
Compression:
Stored size: 415 Bytes
Contents
class AssociationReflection attr_reader :macro attr_reader :name attr_reader :options def initialize(macro, name, options = {}) @macro = macro @name = name @options = options end def class_name @class_name ||= (options[:type] || derive_class_name).to_s end def klass @klass ||= class_name.constantize end private def derive_class_name name.to_s.camelize end end
Version data entries
13 entries across 13 versions & 1 rubygems