Sha256: 01f565a58776a77bc8788989c146e25e79dc9db5d9c4ece72947fb4d20aeb4db

Contents?: true

Size: 590 Bytes

Versions: 48

Compression:

Stored size: 590 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)

        builder
      end
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
ruby-terraform-0.33.0.pre.pre.1 lib/ruby_terraform/commands/workspace.rb
ruby-terraform-0.32.0 lib/ruby_terraform/commands/workspace.rb
ruby-terraform-0.31.0.pre.pre.3 lib/ruby_terraform/commands/workspace.rb
ruby-terraform-0.31.0.pre.pre.2 lib/ruby_terraform/commands/workspace.rb
ruby-terraform-0.31.0.pre.pre.1 lib/ruby_terraform/commands/workspace.rb
ruby-terraform-0.30.0 lib/ruby_terraform/commands/workspace.rb
ruby-terraform-0.29.0.pre.pre.2 lib/ruby_terraform/commands/workspace.rb
ruby-terraform-0.29.0.pre.pre.1 lib/ruby_terraform/commands/workspace.rb