Configure attribute defaults with procs
mainAttributes can have default values defined via a proc. These procs are evaluated lazily on the first read and are executed in the instance context of the object, allowing them to access other attributes.
class SignIn < ActiveType::Object
attribute :email, :string
attribute :nickname, :string, default: proc { email.split('@').first }
end
SignIn.new(email: "tobias@example.org").nickname # => "tobias"