Exception: Smash::CloudPowers::SmashError
- Inherits:
-
Exception
- Object
- Exception
- Smash::CloudPowers::SmashError
- Includes:
- Singleton
- Defined in:
- lib/cloud_powers/smash_error.rb
Defined Under Namespace
Classes: ErrorCollection
Instance Attribute Summary collapse
-
#error_collections ⇒ Object
readonly
Returns the value of attribute error_collections.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
Instance Attribute Details
#error_collections ⇒ Object (readonly)
Returns the value of attribute error_collections.
8 9 10 |
# File 'lib/cloud_powers/smash_error.rb', line 8 def error_collections @error_collections end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
8 9 10 |
# File 'lib/cloud_powers/smash_error.rb', line 8 def errors @errors end |
Instance Method Details
#build!(*args) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/cloud_powers/smash_error.rb', line 17 def build!(*args) @errors ||= args.inject({}) do |col, t| col.merge(t => ErrCol.new(t, 5, [])) end end |
#push_error!(type, message) ⇒ Object
24 25 26 |
# File 'lib/cloud_powers/smash_error.rb', line 24 def push_error!(type, ) @errors[type].push!() end |