Sha256: cf9494f2b1ffd7758f846d80face489032c91b883d485d7f756bfc3d88fc258a

Contents?: true

Size: 561 Bytes

Versions: 6

Compression:

Stored size: 561 Bytes

Contents

require 'lino'
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)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruby-terraform-0.27.0.pre.pre.2 lib/ruby_terraform/commands/workspace.rb
ruby-terraform-0.27.0.pre.pre.1 lib/ruby_terraform/commands/workspace.rb
ruby-terraform-0.26.0 lib/ruby_terraform/commands/workspace.rb
ruby-terraform-0.25.0.pre.pre.1 lib/ruby_terraform/commands/workspace.rb
ruby-terraform-0.24.0 lib/ruby_terraform/commands/workspace.rb
ruby-terraform-0.23.0.pre.pre.1 lib/ruby_terraform/commands/workspace.rb