Skip to content

Commit

Permalink
updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanhimmelman committed May 12, 2016
1 parent 2867dd9 commit d83fe93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ObjectMapper/Core/Map.swift
Expand Up @@ -29,6 +29,7 @@

import Foundation

/// MapContext is available for developers who wish to pass information around during the mapping process.
public protocol MapContext {

}
Expand Down Expand Up @@ -72,7 +73,8 @@ public final class Map {
// check if a value exists for the current key
// do this pre-check for performance reasons
if nested == false {
let object = JSONDictionary[key], isNSNull = object is NSNull
let object = JSONDictionary[key]
let isNSNull = object is NSNull
isKeyPresent = isNSNull ? true : object != nil
currentValue = isNSNull ? nil : object
} else {
Expand Down
2 changes: 1 addition & 1 deletion ObjectMapper/Core/Mappable.swift
Expand Up @@ -15,7 +15,7 @@ public protocol Mappable {
mutating func mapping(map: Map)
/// This is an optional function that can be used to:
/// 1) provide an existing cached object to be used for mapping
/// 2) return an object of another class (which conforms to Mappable) to be used for mapping. For instance, you may inspect the JSON to infer the type of object that should be used for mapping
/// 2) return an object of another class (which conforms to Mappable) to be used for mapping. For instance, you may inspect the JSON to infer the type of object that should be used for any given mapping
static func objectForMapping(map: Map) -> Mappable?
}

Expand Down

0 comments on commit d83fe93

Please sign in to comment.