Exception: SkiBinding::Error
- Inherits:
-
StandardError
- Object
- StandardError
- SkiBinding::Error
- Defined in:
- lib/ski_binding_calculator/error.rb
Instance Method Summary collapse
- #add_message(key, value) ⇒ Object
-
#initialize(key = nil, value = nil) ⇒ Error
constructor
A new instance of Error.
- #messages ⇒ Object
Constructor Details
#initialize(key = nil, value = nil) ⇒ Error
Returns a new instance of Error.
2 3 4 5 6 7 8 |
# File 'lib/ski_binding_calculator/error.rb', line 2 def initialize(key = nil, value = nil) @messages = {} if !key.nil? && !value.nil? @messages[key] = value end end |
Instance Method Details
#add_message(key, value) ⇒ Object
14 15 16 |
# File 'lib/ski_binding_calculator/error.rb', line 14 def (key, value) @messages[key] = value end |
#messages ⇒ Object
10 11 12 |
# File 'lib/ski_binding_calculator/error.rb', line 10 def @messages end |