lib/octofacts_updater/cli.rb
# Print or write to file depending on whether or not the output file was set.
#
# data - Data to print or write.
Print or write to file depending on whether or not the output file was set.
data - Data to print or write.
Print or write to file depending on whether or not the output file was set . data - Data to print or write .
def print_or_write(data)
      if opts[:output_file]
        File.open(opts[:output_file], "w") { |f| f.write(data) }
      else
        puts data
      end
    end
def print_or_write ( data ) if opts [ :output_file ] File . open ( opts [ :output_file ] , "w" ) { | f | f . write ( data ) } else puts data end end
Print or write to file depending on whether or not the output file was set.
Print or write to file depending on whether or not the output file was set .
data
<not_specific>