Hey all! I'm wondering how I can have kotlin "automagically" include a val from a data class in it's generated code? Pseudo code: https://paste.ubuntu.com/p/5tVKgwNTvM/
r
rook
07/10/2018, 7:49 PM
This works fine…
toString()
prints everything.
Copy code
data class Sensor(val timestamp: Date, val tempC: Double, val rh: Double) {
val getTempF = (tempC * 9) / 5 + 32
}