module Seira module Commands class Teleport attr_reader :context, :command def initialize(command, context: nil) @command = command @context = context end def invoke(clean_output: false, return_output: false) puts "Calling: #{calculated_command.green}" unless clean_output if return_output `#{calculated_command}` else system(calculated_command) end end private def calculated_command @calculated_command ||= "tsh #{command}" end end end end