Skip to content
This repository has been archived by the owner on Sep 6, 2018. It is now read-only.

Commit

Permalink
Merge pull request #85 from abbeyjackson/hotfix/expose-image-name
Browse files Browse the repository at this point in the history
Hotfix/expose image name
  • Loading branch information
AliSoftware authored Oct 26, 2017
2 parents 71f7957 + 2ce9a8c commit 1ae3777
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 13 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

### Bug Fixes

_None_
* XCAssets: exposed getter for image name string.
[Abbey Jackson](https://github.com/abbeyjackson)
[#85](https://github.com/SwiftGen/templates/pull/85)

### Breaking Changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
typealias XCTAssetsType = XCTImageAsset

struct XCTImageAsset {
private var name: String
private(set) var name: String

var image: XCTImage {
let bundle = NSBundle(forClass: BundleToken.self)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
typealias AssetType = ImageAsset

struct ImageAsset {
private var name: String
private(set) var name: String

var image: Image {
let bundle = NSBundle(forClass: BundleToken.self)
Expand Down
2 changes: 1 addition & 1 deletion Tests/Expected/XCAssets/swift2-context-all.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
typealias AssetType = ImageAsset

struct ImageAsset {
private var name: String
private(set) var name: String

var image: Image {
let bundle = NSBundle(forClass: BundleToken.self)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
typealias XCTAssetsType = XCTImageAsset

struct XCTImageAsset {
fileprivate var name: String
fileprivate(set) var name: String

var image: XCTImage {
let bundle = Bundle(for: BundleToken.self)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
typealias AssetType = ImageAsset

struct ImageAsset {
fileprivate var name: String
fileprivate(set) var name: String

var image: Image {
let bundle = Bundle(for: BundleToken.self)
Expand Down
2 changes: 1 addition & 1 deletion Tests/Expected/XCAssets/swift3-context-all.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
typealias AssetType = ImageAsset

struct ImageAsset {
fileprivate var name: String
fileprivate(set) var name: String

var image: Image {
let bundle = Bundle(for: BundleToken.self)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
typealias XCTAssetsType = XCTImageAsset

struct XCTImageAsset {
fileprivate var name: String
fileprivate(set) var name: String

var image: XCTImage {
let bundle = Bundle(for: BundleToken.self)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
typealias AssetType = ImageAsset

struct ImageAsset {
fileprivate var name: String
fileprivate(set) var name: String

var image: Image {
let bundle = Bundle(for: BundleToken.self)
Expand Down
2 changes: 1 addition & 1 deletion Tests/Expected/XCAssets/swift4-context-all.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
typealias AssetType = ImageAsset

struct ImageAsset {
fileprivate var name: String
fileprivate(set) var name: String

var image: Image {
let bundle = Bundle(for: BundleToken.self)
Expand Down
2 changes: 1 addition & 1 deletion templates/xcassets/swift2.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
typealias {{enumName}}Type = {{imageType}}

struct {{imageType}} {
private var name: String
private(set) var name: String

var image: {{imageAlias}} {
let bundle = NSBundle(forClass: BundleToken.self)
Expand Down
2 changes: 1 addition & 1 deletion templates/xcassets/swift3.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
typealias {{enumName}}Type = {{imageType}}

struct {{imageType}} {
fileprivate var name: String
fileprivate(set) var name: String

var image: {{imageAlias}} {
let bundle = Bundle(for: BundleToken.self)
Expand Down
2 changes: 1 addition & 1 deletion templates/xcassets/swift4.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
typealias {{enumName}}Type = {{imageType}}

struct {{imageType}} {
fileprivate var name: String
fileprivate(set) var name: String

var image: {{imageAlias}} {
let bundle = Bundle(for: BundleToken.self)
Expand Down

0 comments on commit 1ae3777

Please sign in to comment.