Sha256: 59b571ea3f40aed89b03252d705d77883f4d8093ce7285ead12cfe395a330c33

Contents?: true

Size: 507 Bytes

Versions: 191

Compression:

Stored size: 507 Bytes

Contents

class Jets::Commands::Clean
  class Base
    def initialize(options={})
      @options = options
    end

  private
    def say(message)
      prefix = 'NOOP ' if @options[:noop]
      puts "#{prefix}#{message}" unless @options[:mute]
    end

    def are_you_sure?(message)
      return true if @options[:sure]

      puts "Are you sure that you want to #{message}? (y/N)"
      yes = $stdin.gets.strip
      unless yes =~ /^y/
        puts "Phew that was close!"
        exit 0
      end
    end
  end
end

Version data entries

191 entries across 191 versions & 3 rubygems

Version Path
jets-1.4.5 lib/jets/commands/clean/base.rb
jets-1.4.4 lib/jets/commands/clean/base.rb
jets-1.4.3 lib/jets/commands/clean/base.rb
jets-1.4.2 lib/jets/commands/clean/base.rb
jets-1.4.1 lib/jets/commands/clean/base.rb
jets-1.4.0 lib/jets/commands/clean/base.rb
jets-1.3.9 lib/jets/commands/clean/base.rb
jets-1.3.8 lib/jets/commands/clean/base.rb
jets-1.3.7 lib/jets/commands/clean/base.rb
jets-1.3.6 lib/jets/commands/clean/base.rb
jets-1.3.5 lib/jets/commands/clean/base.rb
jets-1.3.4 lib/jets/commands/clean/base.rb
jets-1.3.3 lib/jets/commands/clean/base.rb
jets-1.3.2 lib/jets/commands/clean/base.rb
jets-1.3.1 lib/jets/commands/clean/base.rb
jets-1.3.0 lib/jets/commands/clean/base.rb
jets-1.2.1 lib/jets/commands/clean/base.rb
jets-1.2.0 lib/jets/commands/clean/base.rb
jets-1.1.5 lib/jets/commands/clean/base.rb
jets-1.1.4 lib/jets/commands/clean/base.rb