Method: Virtus::Attribute::Accessor.extended

Defined in:
lib/virtus/attribute/accessor.rb

.extended(descendant) ⇒ Object

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.



30
31
32
33
34
35
# File 'lib/virtus/attribute/accessor.rb', line 30

def self.extended(descendant)
  super
  name = descendant.options.fetch(:name).to_sym
  descendant.instance_variable_set('@name', name)
  descendant.instance_variable_set('@instance_variable_name', "@#{name}")
end