Class: Sus::Assertions::Error
- Inherits:
-
Object
- Object
- Sus::Assertions::Error
- Defined in:
- lib/sus/assertions.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#identity ⇒ Object
readonly
Returns the value of attribute identity.
Instance Method Summary collapse
- #each_failure {|_self| ... } ⇒ Object
-
#initialize(identity, error) ⇒ Error
constructor
A new instance of Error.
- #message ⇒ Object
Constructor Details
#initialize(identity, error) ⇒ Error
Returns a new instance of Error.
263 264 265 266 |
# File 'lib/sus/assertions.rb', line 263 def initialize(identity, error) @identity = identity @error = error end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
269 270 271 |
# File 'lib/sus/assertions.rb', line 269 def error @error end |
#identity ⇒ Object (readonly)
Returns the value of attribute identity.
268 269 270 |
# File 'lib/sus/assertions.rb', line 268 def identity @identity end |
Instance Method Details
#each_failure {|_self| ... } ⇒ Object
271 272 273 |
# File 'lib/sus/assertions.rb', line 271 def each_failure(&block) yield self end |
#message ⇒ Object
275 276 277 278 279 280 |
# File 'lib/sus/assertions.rb', line 275 def { text: @error., location: @identity&.to_location } end |