Virtus module that can define attributes for later inclusion
@private
@api private
# File lib/virtus/module_extensions.rb, line 10 def self.extended(mod) super setup(mod) end
@api private
# File lib/virtus/module_extensions.rb, line 16 def self.setup(mod, inclusions = [Model], attribute_definitions = []) mod.instance_variable_set('@inclusions', inclusions) mod.instance_variable_set('@attribute_definitions', attribute_definitions) end
Define an attribute in the module
@see Virtus::Extensions#attribute
@return [self]
@api private
# File lib/virtus/module_extensions.rb, line 28 def attribute(name, type = nil, options = {}) @attribute_definitions << [name, type, options] self end
Generated with the Darkfish Rdoc Generator 2.