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.



1615
1616
1617
1618
1619
1620
1621
1622
# File 'lib/ruby_terraform.rb', line 1615

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.



1603
1604
1605
# File 'lib/ruby_terraform.rb', line 1603

def binary
  @binary
end

#loggerObject

Returns the value of attribute logger.



1603
1604
1605
# File 'lib/ruby_terraform.rb', line 1603

def logger
  @logger
end

#optionsObject

Returns the value of attribute options.



1603
1604
1605
# File 'lib/ruby_terraform.rb', line 1603

def options
  @options
end

#stderrObject

Returns the value of attribute stderr.



1603
1604
1605
# File 'lib/ruby_terraform.rb', line 1603

def stderr
  @stderr
end

#stdinObject

Returns the value of attribute stdin.



1603
1604
1605
# File 'lib/ruby_terraform.rb', line 1603

def stdin
  @stdin
end

#stdoutObject

Returns the value of attribute stdout.



1603
1604
1605
# File 'lib/ruby_terraform.rb', line 1603

def stdout
  @stdout
end

Instance Method Details

#default_loggerObject



1605
1606
1607
1608
1609
# File 'lib/ruby_terraform.rb', line 1605

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

#default_optionsObject



1611
1612
1613
# File 'lib/ruby_terraform.rb', line 1611

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