Sha256: 244447c620d8f240517d1915611b1b6cb34e6fb1e8a7a0a00919152fce1378bd

Contents?: true

Size: 591 Bytes

Versions: 1

Compression:

Stored size: 591 Bytes

Contents

# frozen_string_literal: true

require_relative 'base'

module RubyTerraform
  module Commands
    class Workspace < Base
      def subcommands(parameters)
        commands = ['workspace', parameters[:operation]]
        if parameters[:workspace] && parameters[:operation] != 'list'
          commands << parameters[:workspace]
        else
          commands
        end
      end

      def arguments(parameters)
        [parameters[:directory]]
      end

      def parameter_defaults(_parameters)
        { directory: nil, operation: 'list', workspace: nil }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-terraform-0.65.0.pre.9 lib/ruby_terraform/commands/workspace.rb