Class: HashDeepDiff::Reports::Base
- Inherits:
-
Object
- Object
- HashDeepDiff::Reports::Base
- Defined in:
- lib/hash_deep_diff/reports/base.rb
Overview
Abstract Class
Instance Attribute Summary collapse
-
#diff ⇒ Object
readonly
private
Returns the value of attribute diff.
Instance Method Summary collapse
-
#initialize(diff:, change_key_engine: HashDeepDiff::ChangeKey) ⇒ Base
constructor
private
A new instance of Base.
-
#raw_report ⇒ Object
raw data for #report.
-
#report ⇒ String
A report on additions and deletions.
-
#to_s ⇒ String
see #to_str.
-
#to_str ⇒ String
see #report.
Constructor Details
#initialize(diff:, change_key_engine: HashDeepDiff::ChangeKey) ⇒ Base (private)
Returns a new instance of Base.
38 39 40 41 |
# File 'lib/hash_deep_diff/reports/base.rb', line 38 def initialize(diff:, change_key_engine: HashDeepDiff::ChangeKey) @diff = diff.to_ary @change_key = change_key_engine end |
Instance Attribute Details
#diff ⇒ Object (readonly, private)
Returns the value of attribute diff.
35 36 37 |
# File 'lib/hash_deep_diff/reports/base.rb', line 35 def diff @diff end |
Instance Method Details
#raw_report ⇒ Object
raw data for #report
9 10 11 |
# File 'lib/hash_deep_diff/reports/base.rb', line 9 def raw_report raise AbstractMethodError end |
#report ⇒ String
A report on additions and deletions
27 28 29 |
# File 'lib/hash_deep_diff/reports/base.rb', line 27 def report raise AbstractMethodError end |
#to_s ⇒ String
see #to_str
15 16 17 |
# File 'lib/hash_deep_diff/reports/base.rb', line 15 def to_s to_str end |
#to_str ⇒ String
see #report
21 22 23 |
# File 'lib/hash_deep_diff/reports/base.rb', line 21 def to_str report end |