Class: SixthSense::Model::Assertion
- Inherits:
-
Struct
- Object
- Struct
- SixthSense::Model::Assertion
- Defined in:
- lib/sixth_sense/model.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
Returns the value of attribute location.
-
#matcher ⇒ Object
Returns the value of attribute matcher.
-
#message ⇒ Object
Returns the value of attribute message.
-
#subject_expr ⇒ Object
Returns the value of attribute subject_expr.
Instance Method Summary collapse
Instance Attribute Details
#location ⇒ Object
Returns the value of attribute location
61 62 63 |
# File 'lib/sixth_sense/model.rb', line 61 def location @location end |
#matcher ⇒ Object
Returns the value of attribute matcher
61 62 63 |
# File 'lib/sixth_sense/model.rb', line 61 def matcher @matcher end |
#message ⇒ Object
Returns the value of attribute message
61 62 63 |
# File 'lib/sixth_sense/model.rb', line 61 def @message end |
#subject_expr ⇒ Object
Returns the value of attribute subject_expr
61 62 63 |
# File 'lib/sixth_sense/model.rb', line 61 def subject_expr @subject_expr end |
Instance Method Details
#signature ⇒ Object
68 69 70 |
# File 'lib/sixth_sense/model.rb', line 68 def signature [matcher.to_s, subject_expr.to_s.gsub(/\s+/, " ").strip].join(":") end |
#to_h ⇒ Object
72 73 74 75 76 77 78 79 |
# File 'lib/sixth_sense/model.rb', line 72 def to_h { location: location&.to_h, matcher: matcher, subject_expr: subject_expr, message: } end |