Class: Files::Errors
- Inherits:
-
Object
- Object
- Files::Errors
- Defined in:
- lib/files.com/models/errors.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#fields ⇒ Object
array(string) - A list of fields where errors occur.
-
#initialize(attributes = {}, options = {}) ⇒ Errors
constructor
A new instance of Errors.
-
#messages ⇒ Object
array(string) - A list of error messages.
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ Errors
Returns a new instance of Errors.
7 8 9 10 |
# File 'lib/files.com/models/errors.rb', line 7 def initialize(attributes = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/files.com/models/errors.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/errors.rb', line 5 def @options end |
Instance Method Details
#fields ⇒ Object
array(string) - A list of fields where errors occur
13 14 15 |
# File 'lib/files.com/models/errors.rb', line 13 def fields @attributes[:fields] end |
#messages ⇒ Object
array(string) - A list of error messages
18 19 20 |
# File 'lib/files.com/models/errors.rb', line 18 def @attributes[:messages] end |