Sha256: 63ff5904982d78703d211908a697daf74f3645d0ffe6c175f25143f8f7e97dab

Contents?: true

Size: 672 Bytes

Versions: 7

Compression:

Stored size: 672 Bytes

Contents

# frozen_string_literal: true

module Cloud
  module Sh
    module Commands
      class Base
        include Cloud::Sh::Helpers::Commands

        attr_reader :options, :args

        def self.execute(global_options, options, args)
          new(options: global_options.merge(options), args: args).execute
        rescue Exception => e
          puts e.backtrace.join("\n")
          puts e.inspect
        end

        def initialize(options:, args:)
          @options = options
          @args = args
        end

        def execute
          raise NotImplementedError
        end

        def config
          Cloud::Sh.config
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cloud-sh-1.0.6 lib/cloud/sh/commands/base.rb
cloud-sh-1.0.5 lib/cloud/sh/commands/base.rb
cloud-sh-1.0.4 lib/cloud/sh/commands/base.rb
cloud-sh-1.0.3 lib/cloud/sh/commands/base.rb
cloud-sh-1.0.2 lib/cloud/sh/commands/base.rb
cloud-sh-1.0.1 lib/cloud/sh/commands/base.rb
cloud-sh-1.0.0 lib/cloud/sh/commands/base.rb