Module: Virtus::Dirty::Attribute

Defined in:
lib/virtus/dirty.rb

Instance Method Summary collapse

Instance Method Details

#attribute(name, type, options = {}) ⇒ Virtus::Attribute::Object

Creates an attribute writer with dirty tracking

Returns:

  • (Virtus::Attribute::Object)

See Also:

  • Attribute.attribute


88
89
90
91
# File 'lib/virtus/dirty.rb', line 88

def attribute(name, type, options = {})
  _create_writer_with_dirty_tracking(name, attribute = super)
  attribute
end