Sha256: 9aa8e5c86a0df35465151119366b2250f15bf7f6a9bfc37ee4609008ffde9a88
Contents?: true
Size: 1.11 KB
Versions: 14
Compression:
Stored size: 1.11 KB
Contents
module Virtus # Class-level extensions module ClassInclusions # Extends a descendant with class and instance methods # # @param [Class] descendant # # @return [undefined] # # @api private def self.included(descendant) super descendant.extend(ClassMethods) descendant.extend(Extensions::AllowedWriterMethods) descendant.class_eval { include Methods } descendant.class_eval { include InstanceMethods } descendant.class_eval { include InstanceMethods::Constructor } descendant.class_eval { include InstanceMethods::MassAssignment } end private_class_method :included module Methods # Return a list of allowed writer method names # # @return [Set] # # @api private def allowed_writer_methods self.class.allowed_writer_methods end private # Return class' attribute set # # @return [Virtus::AttributeSet] # # @api private def attribute_set self.class.attribute_set end end # Methods end # module ClassInclusions end # module Virtus
Version data entries
14 entries across 12 versions & 3 rubygems