Class: ArtisanMemoryRepository::FutureUser
- Defined in:
- lib/artisan-memory-repository/models/future_user.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
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
#errors ⇒ Object (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 |
#init ⇒ Object
9 10 11 |
# File 'lib/artisan-memory-repository/models/future_user.rb', line 9 def init @errors = {} end |