Sha256: c13df5da688446e113734de32fcb88b58fd278d012f54f01b3c76b73ea6bb33f

Contents?: true

Size: 575 Bytes

Versions: 1

Compression:

Stored size: 575 Bytes

Contents

require_relative 'base'

module RubyTerraform
  module Commands
    class Workspace < Base
      def configure_command(builder, opts)
        directory = opts[:directory] || nil
        operation = opts[:operation] || 'list'
        workspace = opts[:workspace] || nil

        builder = builder
            .with_subcommand('workspace')
            .with_subcommand(operation)

        builder = builder.with_subcommand(workspace) if
            workspace && operation != 'list'
        builder = builder.with_argument(directory)

        builder
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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