Class: Parametric::Top

Inherits:
Object
  • Object
show all
Defined in:
lib/parametric/context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTop

Returns a new instance of Top.



7
8
9
# File 'lib/parametric/context.rb', line 7

def initialize
  @errors = {}
end

Instance Attribute Details

#errorsObject (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