Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

Commit

Permalink
Merge pull request #187 from JohnSundell/xcode9
Browse files Browse the repository at this point in the history
Support Swift 3.2 and Xcode 9
  • Loading branch information
JohnSundell authored Jun 5, 2017
2 parents 4c0b4ae + 7052458 commit 17ad6aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Unboxer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public final class Unboxer {

/// Unbox an optional collection of UnboxableWithContext values by key
public func unbox<C: UnboxableCollection, V: UnboxableWithContext>(key: String, context: V.UnboxContext, allowInvalidElements: Bool = false) -> C? where C.UnboxValue == V {
return try? self.unbox(key: key, context: context, allowInvalidElements: allowInvalidElements)
return try? self.unbox(path: .key(key), transform: V.makeCollectionTransform(context: context, allowInvalidElements: allowInvalidElements))
}

/// Unbox an optional value using a formatter by key
Expand Down Expand Up @@ -186,7 +186,7 @@ public final class Unboxer {

/// Unbox an optional collection of UnboxableWithContext values by key path
public func unbox<C: UnboxableCollection, V: UnboxableWithContext>(keyPath: String, context: V.UnboxContext, allowInvalidElements: Bool = false) -> C? where C.UnboxValue == V {
return try? self.unbox(keyPath: keyPath, context: context, allowInvalidElements: allowInvalidElements)
return try? self.unbox(path: .keyPath(keyPath), transform: V.makeCollectionTransform(context: context, allowInvalidElements: allowInvalidElements))
}

/// Unbox an optional value using a formatter by key path
Expand Down

0 comments on commit 17ad6aa

Please sign in to comment.