Class: Parametric::Top
- Inherits:
-
Object
- Object
- Parametric::Top
- Defined in:
- lib/parametric/context.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
- #add_error(key, msg) ⇒ Object
-
#initialize ⇒ Top
constructor
A new instance of Top.
Constructor Details
#initialize ⇒ Top
Returns a new instance of Top.
7 8 9 |
# File 'lib/parametric/context.rb', line 7 def initialize @errors = {} end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
5 6 7 |
# File 'lib/parametric/context.rb', line 5 def errors @errors end |
Instance Method Details
#add_error(key, msg) ⇒ Object
11 12 13 14 |
# File 'lib/parametric/context.rb', line 11 def add_error(key, msg) errors[key] ||= [] errors[key] << msg end |