-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 in CASH/barber from adrw/20190531.renameElemen…
…ts to master * commit 'afdf8c782fbfc909cd5c196f2edc1dd5f26d6a3d': Rename Elements
- Loading branch information
Showing
19 changed files
with
237 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 19 additions & 19 deletions
38
client/src/main/kotlin/com/squareup/barber/RealRenderer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
package com.squareup.barber | ||
|
||
import com.squareup.barber.models.CopyModel | ||
import com.squareup.barber.models.DocumentSpec | ||
import com.squareup.barber.models.DocumentData | ||
import com.squareup.barber.models.Document | ||
|
||
interface Renderer<C : CopyModel, D : DocumentSpec> { | ||
interface Renderer<C : DocumentData, D : Document> { | ||
/** | ||
* @return a [DocumentSpec] with the values of a [CopyModel] instance rendered in the [DocumentCopy] template | ||
* @return a [Document] with the values of a [DocumentData] instance rendered in the [DocumentTemplate] | ||
*/ | ||
fun render(copyModel: C): D | ||
fun render(documentData: C): D | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
package com.squareup.barber | ||
|
||
import com.squareup.barber.models.CopyModel | ||
import com.squareup.barber.models.DocumentSpec | ||
import com.squareup.barber.models.DocumentData | ||
import com.squareup.barber.models.Document | ||
import kotlin.reflect.KClass | ||
|
||
data class RendererKey ( | ||
val copyModel: KClass<out CopyModel>, | ||
val documentSpec: KClass<out DocumentSpec> | ||
val documentData: KClass<out DocumentData>, | ||
val document: KClass<out Document> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.