Class: RubyTerraform::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_terraform.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



1437
1438
1439
1440
1441
1442
1443
1444
# File 'lib/ruby_terraform.rb', line 1437

def initialize
  @binary = 'terraform'
  @logger = default_logger
  @options = default_options
  @stdin = ''
  @stdout = $stdout
  @stderr = $stderr
end

Instance Attribute Details

#binaryObject

Returns the value of attribute binary.



1425
1426
1427
# File 'lib/ruby_terraform.rb', line 1425

def binary
  @binary
end

#loggerObject

Returns the value of attribute logger.



1425
1426
1427
# File 'lib/ruby_terraform.rb', line 1425

def logger
  @logger
end

#optionsObject

Returns the value of attribute options.



1425
1426
1427
# File 'lib/ruby_terraform.rb', line 1425

def options
  @options
end

#stderrObject

Returns the value of attribute stderr.



1425
1426
1427
# File 'lib/ruby_terraform.rb', line 1425

def stderr
  @stderr
end

#stdinObject

Returns the value of attribute stdin.



1425
1426
1427
# File 'lib/ruby_terraform.rb', line 1425

def stdin
  @stdin
end

#stdoutObject

Returns the value of attribute stdout.



1425
1426
1427
# File 'lib/ruby_terraform.rb', line 1425

def stdout
  @stdout
end

Instance Method Details

#default_loggerObject



1427
1428
1429
1430
1431
# File 'lib/ruby_terraform.rb', line 1427

def default_logger
  logger = Logger.new($stdout)
  logger.level = Logger::INFO
  logger
end

#default_optionsObject



1433
1434
1435
# File 'lib/ruby_terraform.rb', line 1433

def default_options
  Options::Factory.new(Options::DEFINITIONS)
end