Skip to content

Instantly share code, notes, and snippets.

@chizmw
Created December 5, 2018 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chizmw/edcd5387ca6462eedcc882f974eedbfa to your computer and use it in GitHub Desktop.
Save chizmw/edcd5387ca6462eedcc882f974eedbfa to your computer and use it in GitHub Desktop.
abstract class BasePipeline {
abstract def releaseToProd()
}
abstract class BaseEcsPipeline extends BasePipeline {
final def releaseToProd() {
return "ECS Prod Release"
}
}
class MyPipeline extends BaseEcsPipeline {}
class MyNaughtyPipeline extends BaseEcsPipeline {
def releaseToProd() {
return "ECS Prod Release - the naughty way"
}
}
def base = new MyPipeline()
def naughty = new MyNaughtyPipeline()
println base.releaseToProd()
println naughty.releaseToProd()
@chizmw
Copy link
Author

chizmw commented Dec 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment