Exception: Muack::Failure
- Inherits:
-
StandardError
- Object
- StandardError
- Muack::Failure
- Defined in:
- lib/muack/failure.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#expected ⇒ Object
readonly
Returns the value of attribute expected.
Instance Method Summary collapse
Instance Attribute Details
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
4 5 6 |
# File 'lib/muack/failure.rb', line 4 def expected @expected end |
Instance Method Details
#build_expected(obj, expected_defis) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/muack/failure.rb', line 5 def build_expected obj, expected_defis @expected = expected_defis.uniq{ |d| [d.msg, d.args] }.map{ |defi| "#{obj.inspect}.#{defi.msg}(" \ "#{defi.args.map(&:inspect).join(', ')})" }.join("\n or: ") end |