Class: Nemo::MetaObject::ValidationError
- Inherits:
-
Object
- Object
- Nemo::MetaObject::ValidationError
- Defined in:
- lib/nemo/metaobject/validation.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
Returns the value of attribute attribute.
-
#error_string ⇒ Object
Returns the value of attribute error_string.
Instance Method Summary collapse
-
#initialize(a, error_string) ⇒ ValidationError
constructor
A new instance of ValidationError.
- #to_s ⇒ Object
Constructor Details
#initialize(a, error_string) ⇒ ValidationError
Returns a new instance of ValidationError.
5 6 7 8 |
# File 'lib/nemo/metaobject/validation.rb', line 5 def initialize(a, error_string) @attribute = a @error_string = error_string end |
Instance Attribute Details
#attribute ⇒ Object
Returns the value of attribute attribute.
3 4 5 |
# File 'lib/nemo/metaobject/validation.rb', line 3 def attribute @attribute end |
#error_string ⇒ Object
Returns the value of attribute error_string.
3 4 5 |
# File 'lib/nemo/metaobject/validation.rb', line 3 def error_string @error_string end |
Instance Method Details
#to_s ⇒ Object
10 11 12 |
# File 'lib/nemo/metaobject/validation.rb', line 10 def to_s sprintf('%s: %s', @attribute.label, @error_string) end |