Skip to content

Instantly share code, notes, and snippets.

@renanboni
Created April 13, 2019 19:21
Show Gist options
  • Save renanboni/044b43c82d61549e0c0242c06798dd8c to your computer and use it in GitHub Desktop.
Save renanboni/044b43c82d61549e0c0242c06798dd8c to your computer and use it in GitHub Desktop.
class FirebaseMapper: Mapper<Event, FirebaseEvent> {
override fun mapFrom(e: Event): FirebaseEvent {
val firebaseEvent = FirebaseEvent(e.name)
e.params?.let {
val bundle = Bundle()
for (param in it) {
bundle.putString(param.key, param.value as String)
}
}
return firebaseEvent
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment