Sha256: 101af31d9713d6c184ab58b041b155961f62fb73a51f4b4a57c80854018f48ec

Contents?: true

Size: 653 Bytes

Versions: 4

Compression:

Stored size: 653 Bytes

Contents

# frozen_string_literal: true

require_relative 'base'

module RubyTerraform
  module Commands
    class Show < Base
      def configure_command(builder, opts)
        path = opts[:path] || opts[:directory]
        json_format = opts[:json]
        no_color = opts[:no_color]
        module_depth = opts[:module_depth]

        builder
          .with_subcommand('show') do |sub|
          sub = sub.with_option('-module-depth', module_depth) if module_depth
          sub = sub.with_flag('-no-color') if no_color
          sub = sub.with_flag('-json') if json_format
          sub
        end
          .with_argument(path)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruby-terraform-0.65.0.pre.4 lib/ruby_terraform/commands/show.rb
ruby-terraform-0.65.0.pre.3 lib/ruby_terraform/commands/show.rb
ruby-terraform-0.65.0.pre.2 lib/ruby_terraform/commands/show.rb
ruby-terraform-0.65.0.pre.1 lib/ruby_terraform/commands/show.rb