Class: Niman::Library::Command
- Inherits:
-
Object
- Object
- Niman::Library::Command
- Defined in:
- lib/niman/library/command.rb
Instance Method Summary collapse
Instance Method Details
#description ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/niman/library/command.rb', line 17 def description if use_sudo == :sudo "sudo #{command}" else command end end |
#errors ⇒ Object
13 14 15 |
# File 'lib/niman/library/command.rb', line 13 def errors "command must not be empty" end |
#valid? ⇒ Boolean
9 10 11 |
# File 'lib/niman/library/command.rb', line 9 def valid? !command.empty? && [:no_sudo, :sudo].include?(use_sudo) end |