Class: Djinni::Wish::Clear
- Inherits:
-
Djinni::Wish
- Object
- Djinni::Wish
- Djinni::Wish::Clear
- Defined in:
- lib/djinni/wish/clear.rb
Instance Method Summary collapse
Methods inherited from Djinni::Wish
Instance Method Details
#aliases ⇒ Object
2 3 4 |
# File 'lib/djinni/wish/clear.rb', line 2 def aliases return ["clear", "cls"] end |
#description ⇒ Object
6 7 8 |
# File 'lib/djinni/wish/clear.rb', line 6 def description return "Clear the screen" end |
#execute(args, djinni_env = {}) ⇒ Object
10 11 12 13 |
# File 'lib/djinni/wish/clear.rb', line 10 def execute(args, djinni_env = {}) system("clear") if (args.empty?) usage if (!args.empty?) end |
#usage ⇒ Object
15 16 17 18 |
# File 'lib/djinni/wish/clear.rb', line 15 def usage puts aliases.join(", ") puts " #{description}." end |