Class: RuPacRemove::PacRemove
- Inherits:
-
Pacman
- Object
- Pacman
- RuPacRemove::PacRemove
- Defined in:
- lib/rupacremove.rb
Overview
PacRemove class
Handles all the -R commands from Pacman
Decends from Pacman
Instance Method Summary collapse
-
#allOpts(*packs) ⇒ Object
Represents -Rckns Raises an exception if @@lock is already yes.
-
#cascade(*packs) ⇒ Object
Represents -Rc Raises an exception if @@lock is yes.
-
#casKeepNoSave(*packs) ⇒ Object
Represents -Rckn Raises an exception if @@lock is already yes.
-
#casKeepRecursive(*packs) ⇒ Object
Represents -Rcks Raises an exception if @@lock is already yes.
-
#casNoSaveRecursive(*packs) ⇒ Object
Represents -Rcns Raises an exception if @@lock is already yes.
-
#initialize ⇒ PacRemove
constructor
A new instance of PacRemove.
-
#keep(*packs) ⇒ Object
Represents -Rk Raises an exception if @@lock is already yes.
-
#keepCas(*packs) ⇒ Object
Represents -Rck Raises an exception if @@lock is already yes.
-
#keepNoSave(*packs) ⇒ Object
Represents -Rkn Raises an exception if @@lock is already yes.
-
#keepNoSaveRecursive(*packs) ⇒ Object
Represents -Rkns Raises an exception if @@lock is already yes.
-
#keepRecursive(*packs) ⇒ Object
Represents -Rks Raises an exception if @@lock is already yes.
-
#noSave(*packs) ⇒ Object
Represents -Rn Raises an exception if @@lock is already yes.
-
#noSaveCas(*packs) ⇒ Object
Represents -Rcn Raises an exception if @@lock is already yes.
-
#noSaveRecursive(*packs) ⇒ Object
Represents -Rns Raises an exception if @@lock is already yes.
-
#reCas(*packs) ⇒ Object
Represents -Rcs Raises an exception if @@lock is already yes.
-
#recursive(*packs) ⇒ Object
Represents -Rs Raises an exception if @@lock is already yes.
Constructor Details
#initialize ⇒ PacRemove
Returns a new instance of PacRemove.
20 21 22 |
# File 'lib/rupacremove.rb', line 20 def initialize super( "yes" ) end |
Instance Method Details
#allOpts(*packs) ⇒ Object
Represents -Rckns
Raises an exception if @@lock is already yes
194 195 196 197 198 199 200 201 202 |
# File 'lib/rupacremove.rb', line 194 def allOpts( *packs ) if @@lock == "no" @@lock = "yes" exec( "#{@command}ckns #{packs.join( ' ' )}" ) @@lock = "no" else raise "#{@@lockerror}" end end |
#cascade(*packs) ⇒ Object
Represents -Rc
Raises an exception if @@lock is yes
26 27 28 29 30 31 32 33 34 |
# File 'lib/rupacremove.rb', line 26 def cascade( *packs ) if @@lock == "no" @@lock = "yes" exec( "#{@command}c #{packs.join( ' ' )}" ) @@lock = "no" else raise "#{@@lockerror}" end end |
#casKeepNoSave(*packs) ⇒ Object
Represents -Rckn
Raises an exception if @@lock is already yes
146 147 148 149 150 151 152 153 154 |
# File 'lib/rupacremove.rb', line 146 def casKeepNoSave( *packs ) if @@lock == "no" @@lock = "yes" exec( "#{@command}ckn #{packs.join( ' ' )}" ) @@lock = "no" else raise "#{@@lockerror}" end end |
#casKeepRecursive(*packs) ⇒ Object
Represents -Rcks
Raises an exception if @@lock is already yes
182 183 184 185 186 187 188 189 190 |
# File 'lib/rupacremove.rb', line 182 def casKeepRecursive( *packs ) if @@lock == "no" @@lock = "yes" exec( "#{@command}cks #{packs.join( ' ' )}" ) @@lock = "no" else raise "#{@@lockerror}" end end |
#casNoSaveRecursive(*packs) ⇒ Object
Represents -Rcns
Raises an exception if @@lock is already yes
170 171 172 173 174 175 176 177 178 |
# File 'lib/rupacremove.rb', line 170 def casNoSaveRecursive( *packs ) if @@lock == "no" @@lock = "yes" exec( "#{@command}cns #{packs.join( ' ' )}" ) @@lock = "no" else raise "#{@@lockerror}" end end |
#keep(*packs) ⇒ Object
Represents -Rk
Raises an exception if @@lock is already yes
38 39 40 41 42 43 44 45 46 |
# File 'lib/rupacremove.rb', line 38 def keep( *packs ) if @@lock == "no" @@lock = "yes" exec( "#{@command}k #{packs.join( ' ' )}" ) @@lock = "no" else raise "#{@@lockerror}" end end |
#keepCas(*packs) ⇒ Object
Represents -Rck
Raises an exception if @@lock is already yes
86 87 88 89 90 91 92 93 94 |
# File 'lib/rupacremove.rb', line 86 def keepCas( *packs ) if @@lock == "no" @@lock = "yes" exec( "#{@command}ck #{packs.join( ' ' )}" ) @@lock = "no" else raise "#{@@lockerror}" end end |
#keepNoSave(*packs) ⇒ Object
Represents -Rkn
Raises an exception if @@lock is already yes
110 111 112 113 114 115 116 117 118 |
# File 'lib/rupacremove.rb', line 110 def keepNoSave( *packs ) if @@lock == "no" @@lock = "yes" exec( "#{@command}kn #{packs.join( ' ' )}" ) @@lock = "no" else raise "#{@@lockerror}" end end |
#keepNoSaveRecursive(*packs) ⇒ Object
Represents -Rkns
Raises an exception if @@lock is already yes
158 159 160 161 162 163 164 165 166 |
# File 'lib/rupacremove.rb', line 158 def keepNoSaveRecursive( *packs ) if @@lock == "no" @@lock = "yes" exec( "#{@command}kns #{packs.join( ' ' )}" ) @@lock = "no" else raise "#{@@lockerror}" end end |
#keepRecursive(*packs) ⇒ Object
Represents -Rks
Raises an exception if @@lock is already yes
122 123 124 125 126 127 128 129 130 |
# File 'lib/rupacremove.rb', line 122 def keepRecursive( *packs ) if @@lock == "no" @@lock = "yes" exec( "#{@command}ks #{packs.join( ' ' )}" ) @@lock = "no" else raise "#{@@lockerror}" end end |
#noSave(*packs) ⇒ Object
Represents -Rn
Raises an exception if @@lock is already yes
50 51 52 53 54 55 56 57 58 |
# File 'lib/rupacremove.rb', line 50 def noSave( *packs ) if @@lock == "no" @@lock = "yes" exec( "#{@command}n #{packs.join( ' ' )}" ) @@lock = "no" else raise "#{@@lockerror}" end end |
#noSaveCas(*packs) ⇒ Object
Represents -Rcn
Raises an exception if @@lock is already yes
98 99 100 101 102 103 104 105 106 |
# File 'lib/rupacremove.rb', line 98 def noSaveCas( *packs ) if @@lock == "no" @@lock = "yes" exec( "#{@command}cn #{packs.join( ' ' )}" ) @@lock = "no" else raise "#{@@lockerror}" end end |
#noSaveRecursive(*packs) ⇒ Object
Represents -Rns
Raises an exception if @@lock is already yes
134 135 136 137 138 139 140 141 142 |
# File 'lib/rupacremove.rb', line 134 def noSaveRecursive( *packs ) if @@lock == "no" @@lock = "yes" exec( "#{@command}ns #{packs.join( ' ' )}" ) @@lock = "no" else raise "#{@@lockerror}" end end |
#reCas(*packs) ⇒ Object
Represents -Rcs
Raises an exception if @@lock is already yes
74 75 76 77 78 79 80 81 82 |
# File 'lib/rupacremove.rb', line 74 def reCas( *packs ) if @@lock == "no" @@lock = "yes" exec( "#{@command}cs #{packs.join( ' ' )}" ) @@lock = "no" else raise "#{@@lockerror}" end end |
#recursive(*packs) ⇒ Object
Represents -Rs
Raises an exception if @@lock is already yes
62 63 64 65 66 67 68 69 70 |
# File 'lib/rupacremove.rb', line 62 def recursive( *packs ) if @@lock == "no" @@lock = "yes" exec( "#{@command}s #{packs.join( ' ' )}" ) @@lock = "no" else raise "#{@@lockerror}" end end |