Sha256: 8f2ae77306f9fb77985d58871dc9acfc051766fc6dd28bf6a45094bb426e3d8e
Contents?: true
Size: 583 Bytes
Versions: 6
Compression:
Stored size: 583 Bytes
Contents
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
Version data entries
6 entries across 6 versions & 1 rubygems