Exception: AbideDevUtils::XCCDF::Parser::Objects::DiffableObject::DiffableObjectError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/abide_dev_utils/xccdf/parser/objects/diffable_object.rb

Overview

Generic error class for diffable objects

Direct Known Subclasses

NotSameClassError

Instance Method Summary collapse

Constructor Details

#initialize(self_obj = nil, other_obj = nil, custom_msg: nil) ⇒ DiffableObjectError

Returns a new instance of DiffableObjectError.



11
12
13
14
15
16
17
18
19
20
# File 'lib/abide_dev_utils/xccdf/parser/objects/diffable_object.rb', line 11

def initialize(self_obj = nil, other_obj = nil, custom_msg: nil)
  if custom_msg.nil?
    super("This object (#{self_obj}) is not diffable with other object (#{other_obj})")
  else
    super(custom_msg)
  end
  @self_obj = self_obj
  @other_obj = other_obj
  @custom_msg = custom_msg
end