class EcoRake module Lib module Task class RunnerLaunch < EcoRake::Lib::BaseTask FORWARD_RULES = { enviro: ->(enviro) { "-#{enviro}"}, simulate: '-simulate' }.freeze options_with_defaults true options_use EcoRake::Lib::Task::RunnerOptions attr_const :target_enviro, required: true option_reopen :enviro, default_lookup: :target_enviro option_forwarding(**FORWARD_RULES) private def command(*args) cmd = [ruby_runner] cmd.push(*forward_options(:enviro, :simulate)) cmd.push(*args) cmd = yield(cmd) if block_given? string_cmd(*cmd) end def people_get_command string_cmd(ruby_runner, forward_option(:enviro), '-get-people') end end end end end