Class: Mutations::ErrorAtom
- Inherits:
-
Object
- Object
- Mutations::ErrorAtom
- Defined in:
- lib/mutations/errors.rb
Instance Method Summary collapse
-
#initialize(key, error_symbol, options = {}) ⇒ ErrorAtom
constructor
ErrorAtom.new(:name, :too_short) ErrorAtom.new(:name, :too_short, message: “is too short”).
- #message ⇒ Object
- #message_list ⇒ Object
- #symbolic ⇒ Object
Constructor Details
#initialize(key, error_symbol, options = {}) ⇒ ErrorAtom
ErrorAtom.new(:name, :too_short) ErrorAtom.new(:name, :too_short, message: “is too short”)
65 66 67 68 69 70 |
# File 'lib/mutations/errors.rb', line 65 def initialize(key, error_symbol, = {}) @key = key @symbol = error_symbol @message = [:message] @index = [:index] end |
Instance Method Details
#message ⇒ Object
76 77 78 |
# File 'lib/mutations/errors.rb', line 76 def @message ||= Mutations..(@key, @symbol, :index => @index) end |
#message_list ⇒ Object
80 81 82 |
# File 'lib/mutations/errors.rb', line 80 def Array() end |
#symbolic ⇒ Object
72 73 74 |
# File 'lib/mutations/errors.rb', line 72 def symbolic @symbol end |