Class: ArtisanMemoryRepository::FutureUser

Inherits:
Base
  • Object
show all
Defined in:
lib/artisan-memory-repository/models/future_user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#==, _collections, _fields, #attributes, boolean, collections, data_attributes, #get, #initialize, #saves?, #set, #to_param, #update_attributes

Constructor Details

This class inherits a constructor from ArtisanMemoryRepository::Base

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



7
8
9
# File 'lib/artisan-memory-repository/models/future_user.rb', line 7

def errors
  @errors
end

Instance Method Details

#add_errors(errors_hash) ⇒ Object



13
14
15
16
17
18
# File 'lib/artisan-memory-repository/models/future_user.rb', line 13

def add_errors(errors_hash)
  errors_hash.each_pair do |key, value|
    @errors[key] = @errors[key] || []
    @errors[key] << value
  end
end

#initObject



9
10
11
# File 'lib/artisan-memory-repository/models/future_user.rb', line 9

def init
  @errors = {}
end