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.
256 257 258 259 |
# File 'lib/sus/assertions.rb', line 256 def initialize(identity, error) @identity = identity @error = error end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
262 263 264 |
# File 'lib/sus/assertions.rb', line 262 def error @error end |
#identity ⇒ Object (readonly)
Returns the value of attribute identity.
261 262 263 |
# File 'lib/sus/assertions.rb', line 261 def identity @identity end |
Instance Method Details
#each_failure {|_self| ... } ⇒ Object
264 265 266 |
# File 'lib/sus/assertions.rb', line 264 def each_failure(&block) yield self end |
#message ⇒ Object
268 269 270 271 272 273 |
# File 'lib/sus/assertions.rb', line 268 def { text: @error., location: @identity&.to_location } end |