Class: Lookout::Difference::Symbol
- Defined in:
- lib/lookout-3.0/difference/symbol.rb
Overview
Difference reports between Symbols.
Instance Attribute Summary
Attributes inherited from Object
Instance Method Summary collapse
-
#initialize(actual, expected, query, negated) ⇒ Symbol
constructor
Initializes a difference report between the ACTUAL result Symbol and the EXPECTED value Symbol, with QUERY being the name of the query method that EXPECTED represents, if any, whose result may be NEGATED.
-
#message ⇒ ::String, super
A String of the form Object#actual#QUERY, prefixed by ‘¬’ if the query was negated, if there was a query, super otherwise.
Methods inherited from Object
Constructor Details
#initialize(actual, expected, query, negated) ⇒ Symbol
Initializes a difference report between the ACTUAL result Symbol and the EXPECTED value Symbol, with QUERY being the name of the query method that EXPECTED represents, if any, whose result may be NEGATED.
11 12 13 14 |
# File 'lib/lookout-3.0/difference/symbol.rb', line 11 def initialize(actual, expected, query, negated) super actual, expected @query, @negated = query, negated end |
Instance Method Details
#message ⇒ ::String, super
Returns A String of the form Object#actual#QUERY, prefixed by ‘¬’ if the query was negated, if there was a query, super otherwise.
18 19 20 |
# File 'lib/lookout-3.0/difference/symbol.rb', line 18 def @query ? [@negated ? '' : '¬', inspect_actual, '#', @query].join('') : super end |