# @return [nil] returns nil unless an error is raised
defvalidate_reuse_preconditions
unlessreused_path_unique?
raiseResourceReuseError,
"Reusable groups must have the same name. The group reused as #{reuse_as} has the path '#{path}' but it should be '#{self.class.resources[reuse_as].path}'"
end
end
# Confirms that reuse of the resource did not change it in a way that breaks later reuse. This raises an error if
# the current group path doesn't match the original path.
defvalidate_reuse
reload!
ifapi_resource[:path]!=@path
raiseResourceReuseError,"The group now has the path '#{api_resource[:path]}' but it should be '#{path}'"
end
end
# Checks if the group is being reused with the same path.
#
# @return [Boolean] true if the group's path is different from another group with the same reuse symbol (reuse_as)