Skip to content

Instantly share code, notes, and snippets.

@stuntgoat
Last active August 29, 2015 14:06
Show Gist options
  • Save stuntgoat/4f673cf5e4dcde992535 to your computer and use it in GitHub Desktop.
Save stuntgoat/4f673cf5e4dcde992535 to your computer and use it in GitHub Desktop.
The base classes.
class Dirt
class GardenItem extends Dirt {
val flavor = "seedy"
}
class Cucumber extends GardenItem {
override val flavor = "bland"
}
class Watermelon extends GardenItem {
override val flavor = "sweet"
}
class Cocktail extends Cucumber {
override val flavor = "refreshing"
}
class FruitSalad extends Watermelon {
override val flavor = "fruity"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment