Sha256: 1374f57b5a48b4a919cfd10b0062051a687d0fd736e40bb6c7f8a6c02abaf500

Contents?: true

Size: 485 Bytes

Versions: 2

Compression:

Stored size: 485 Bytes

Contents

# Child class must implement this interface.
# Methods:
#   clean - removes resources.  This method should use the are_you_sure? method to
#     prompt the user before deleting.
class AwsClean::Base
  include AwsClean::AwsServices

  def initialize(options)
    @options = options
  end

  def are_you_sure?(message)
    return false if ENV['TEST']
    return true if @options[:sure]
    puts message

    puts "Are you sure? (yes/no)"
    yes = $stdin.gets
    yes =~ /yes/
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
aws-clean-0.2.0 lib/aws_clean/base.rb
aws-clean-0.1.0 lib/aws_clean/base.rb