mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-10-13 17:49:25 +00:00
Reformat Item ctor and simplify toString
This commit is contained in:
1 parent
eded7b38b5
commit
5358002d45
1 file changed
+6
-4
@@ -1,7 +1,9 @@
|
||||
package com.gildedrose
|
||||
|
||||
open class Item(var name: String, var sellIn: Int, var quality: Int) {
|
||||
override fun toString(): String {
|
||||
return this.name + ", " + this.sellIn + ", " + this.quality
|
||||
}
|
||||
open class Item(
|
||||
var name: String,
|
||||
var sellIn: Int,
|
||||
var quality: Int,
|
||||
) {
|
||||
override fun toString(): String = "$name, $sellIn, $quality"
|
||||
}
|
||||
Reference in new issue
Block a user