module Virtus::InstanceMethods::Constructor
Public Class Methods
new(attributes = nil)
click to toggle source
Set attributes during initialization of an object
@param [#to_hash] attributes
the attributes hash to be set
@return [undefined]
@api private
# File lib/virtus/instance_methods.rb, line 16 def initialize(attributes = nil) self.class.attribute_set.set(self, attributes) if attributes set_default_attributes end