Created
December 5, 2018 16:13
-
-
Save chizmw/edcd5387ca6462eedcc882f974eedbfa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check me out here: https://groovy-playground.appspot.com/#?load=edcd5387ca6462eedcc882f974eedbfa