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.



95
96
97
98
99
100
101
# File 'lib/ruby_terraform.rb', line 95

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

Instance Attribute Details

#binaryObject

Returns the value of attribute binary.



87
88
89
# File 'lib/ruby_terraform.rb', line 87

def binary
  @binary
end

#loggerObject

Returns the value of attribute logger.



87
88
89
# File 'lib/ruby_terraform.rb', line 87

def logger
  @logger
end

#stderrObject

Returns the value of attribute stderr.



87
88
89
# File 'lib/ruby_terraform.rb', line 87

def stderr
  @stderr
end

#stdinObject

Returns the value of attribute stdin.



87
88
89
# File 'lib/ruby_terraform.rb', line 87

def stdin
  @stdin
end

#stdoutObject

Returns the value of attribute stdout.



87
88
89
# File 'lib/ruby_terraform.rb', line 87

def stdout
  @stdout
end

Instance Method Details

#default_loggerObject



89
90
91
92
93
# File 'lib/ruby_terraform.rb', line 89

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