class Ruby::Terraform::Commands::ValidateCommand

Attributes

dir[RW]
json[RW]

Public Class Methods

new(opts = {}) click to toggle source
# File lib/ruby/terraform/commands/validate_command.rb, line 10
def initialize(opts = {})
  @dir = opts[:dir]
  @json = opts[:json]
end

Public Instance Methods

command() click to toggle source
# File lib/ruby/terraform/commands/validate_command.rb, line 15
def command
  cmd = %W[#{tf_binary} validate]

  cmd += ['-json'] if json

  cmd += [dir] if dir
  cmd
end