class EcoRake module Lib module Task class RunnerRely < EcoRake::Lib::BaseTask FORWARD_RULES = { simulate: :mirror, task: :mirror }.freeze options_with_defaults true options_use EcoRake::Lib::Task::RunnerOptions option_forwarding(**FORWARD_RULES) def task(*_args) sh_continue command end private def command cmd = [base_command] cmd << target_task cmd << '--' cmd << forward_option(:task) cmd << forward_option(:simulate) string_cmd(*cmd) end def base_command "rake" end def target_task raise "In a hub you should re-write this method" end end end end end