def check_hash_for_conflicts(hash)
      raise HashArgumentError, 'It must be a hash' unless hash.is_a?(Hash)

      unless (conflicts = self.public_methods & hash.keys.map(&:to_sym)).empty?
        raise HashArgumentError, "Rename keys in order to avoid conflicts with internal calls: #{conflicts.join(', ')}"
      end
    end
def check_hash_for_conflicts(hash)
      raise HashArgumentError, 'It must be a hash' unless hash.is_a?(Hash)

      unless (conflicts = self.public_methods & hash.keys.map(&:to_sym)).empty?
        raise HashArgumentError, "Rename keys in order to avoid conflicts with internal calls: #{conflicts.join(', ')}"
      end
    end
Checks if provided option is a hash and if the keys are not in confict with OpenStruct public methods.