Class: Autoaudio::Destroy
- Inherits:
-
Thor
- Object
- Thor
- Autoaudio::Destroy
- Defined in:
- lib/autoaudio/destroy.rb
Instance Method Summary collapse
Instance Method Details
#everything ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/autoaudio/destroy.rb', line 7 def everything if yes?("Preparing to destroy Everything. Are you sure? [yN]") invoke :genres invoke :release_dates invoke :releases else say "That's probably for the best..." end end |
#genres ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/autoaudio/destroy.rb', line 28 def genres if yes?("Preparing to destroy all genres. Are you sure? [yN]") Genre.destroy_all say "BOOM!", :red else say "That's probably for the best..." end end |
#release_dates ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/autoaudio/destroy.rb', line 38 def release_dates if yes?("Preparing to destroy all release dates. Are you sure? [yN]") ReleaseDate.destroy_all say "BOOM!", :red else say "That's probably for the best..." end end |
#releases ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/autoaudio/destroy.rb', line 18 def releases if yes?("Preparing to destroy all releases. Are you sure? [yN]") Release.destroy_all say "BOOM!", :red else say "That's probably for the best..." end end |