lib/ruby_terraform/commands/output.rb in ruby-terraform-0.65.0.pre.11 vs lib/ruby_terraform/commands/output.rb in ruby-terraform-0.65.0.pre.12
- old
+ new
@@ -7,13 +7,11 @@
module RubyTerraform
module Commands
class Output < Base
include RubyTerraform::Options::Common
- def initialize_command
- return if defined?(@stdout) && @stdout.respond_to?(:string)
-
- @stdout = StringIO.new
+ def stdout
+ @stdout.respond_to?(:string) ? @stdout : (@stdout = StringIO.new)
end
def subcommands
%w[output]
end