Class: Fog::Bouncer::CLI::AbstractCommand
- Inherits:
-
Clamp::Command
- Object
- Clamp::Command
- Fog::Bouncer::CLI::AbstractCommand
- Defined in:
- lib/fog/bouncer/cli.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#confirm ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/fog/bouncer/cli.rb', line 46 def confirm unless confirmation puts puts " ! WARNING: This action is not marked as being safe." puts " ! To proceed, enter \"confirmation\" or re-run this command with --confirm confirmation" puts print "> " confirmation = $stdin.gets.chomp end confirmation == "confirmation" || raise("Confirmation failed") end |
#file ⇒ Object
60 61 62 63 64 65 66 67 68 |
# File 'lib/fog/bouncer/cli.rb', line 60 def file if @file && File.exists?(File.(@file)) File.(@file) elsif File.exists?(File.("Doorlist")) File.("Doorlist") else raise("Doorlist not found") end end |