Class: SoberSwag::Reporting::Report::MergedObject
- Defined in:
- lib/sober_swag/reporting/report/merged_object.rb
Overview
Report on problems with a merged object.
Instance Attribute Summary collapse
-
#child ⇒ Object
readonly
Returns the value of attribute child.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
Instance Method Summary collapse
- #each_error ⇒ Object
-
#initialize(parent, child) ⇒ MergedObject
constructor
A new instance of MergedObject.
Methods inherited from Base
Constructor Details
#initialize(parent, child) ⇒ MergedObject
Returns a new instance of MergedObject.
7 8 9 10 |
# File 'lib/sober_swag/reporting/report/merged_object.rb', line 7 def initialize(parent, child) @parent = parent @child = child end |
Instance Attribute Details
#child ⇒ Object (readonly)
Returns the value of attribute child.
12 13 14 |
# File 'lib/sober_swag/reporting/report/merged_object.rb', line 12 def child @child end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
12 13 14 |
# File 'lib/sober_swag/reporting/report/merged_object.rb', line 12 def parent @parent end |
Instance Method Details
#each_error ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/sober_swag/reporting/report/merged_object.rb', line 14 def each_error return enum_for(:each_error) unless block_given? # rubocop:disable Style/ExplicitBlockArgument parent.each_error { |k, v| yield k, v } child.each_error { |k, v| yield k, v } # rubocop:enable Style/ExplicitBlockArgument end |