Method: Virtus::ModuleExtensions#attribute
- Defined in:
- lib/virtus/module_extensions.rb
#attribute(name, type = nil, options = {}) ⇒ self
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Define an attribute in the module
30 31 32 33 |
# File 'lib/virtus/module_extensions.rb', line 30 def attribute(name, type = nil, = {}) @attribute_definitions << [name, type, ] self end |