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”)
76 77 78 79 80 81 |
# File 'lib/mutations/errors.rb', line 76 def initialize(key, error_symbol, = {}) @key = key @symbol = error_symbol @message = [:message] @index = [:index] end |
Instance Method Details
#message ⇒ Object
87 88 89 |
# File 'lib/mutations/errors.rb', line 87 def @message ||= Mutations..(@key, @symbol, :index => @index) end |
#message_list ⇒ Object
91 92 93 |
# File 'lib/mutations/errors.rb', line 91 def Array() end |
#symbolic ⇒ Object
83 84 85 |
# File 'lib/mutations/errors.rb', line 83 def symbolic @symbol end |