Skip to content

Commit

Permalink
Use copy-property pattern for NSString config options
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Vickery <josh@yfactorial.com>
  • Loading branch information
adamalex authored and Joshua Vickery committed Mar 11, 2009
1 parent a181fed commit 07b0add
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions Classes/lib/NSObject+ObjectiveResource.m
Expand Up @@ -29,23 +29,32 @@ + (NSString *)getRemoteSite {
}

+ (void)setRemoteSite:(NSString *)siteURL {
_activeResourceSite = siteURL;
if (_activeResourceSite != siteURL) {
[_activeResourceSite autorelease];
_activeResourceSite = [siteURL copy];
}
}

+ (NSString *)getRemoteUser {
return _activeResourceUser;
}

+ (void)setRemoteUser:(NSString *)user {
_activeResourceUser = user;
if (_activeResourceUser != user) {
[_activeResourceUser autorelease];
_activeResourceUser = [user copy];
}
}

+ (NSString *)getRemotePassword {
return _activeResourcePassword;
}

+ (void)setRemotePassword:(NSString *)password {
_activeResourcePassword = password;
if (_activeResourcePassword != password) {
[_activeResourcePassword autorelease];
_activeResourcePassword = [password copy];
}
}

+ (void)setRemoteResponseType:(ORSResponseFormat) format {
Expand Down Expand Up @@ -89,7 +98,10 @@ + (NSString *)getRemoteProtocolExtension {
}

+ (void)setRemoteProtocolExtension:(NSString *)protocolExtension {
_activeResourceProtocolExtension = protocolExtension;
if (_activeResourceProtocolExtension != protocolExtension) {
[_activeResourceProtocolExtension autorelease];
_activeResourceProtocolExtension = [protocolExtension copy];
}
}


Expand Down

0 comments on commit 07b0add

Please sign in to comment.