Class: ResetWish
- Inherits:
-
Djinni::Wish
- Object
- Djinni::Wish
- ResetWish
- Defined in:
- lib/zoom/wish/reset_wish.rb
Instance Method Summary collapse
Instance Method Details
#aliases ⇒ Object
4 5 6 |
# File 'lib/zoom/wish/reset_wish.rb', line 4 def aliases return ["default", "reset"] end |
#description ⇒ Object
8 9 10 |
# File 'lib/zoom/wish/reset_wish.rb', line 8 def description return "Create default profiles" end |
#execute(args, djinni_env = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/zoom/wish/reset_wish.rb', line 12 def execute(args, djinni_env = {}) if (!args.empty?) usage return end FileUtils.rm_f(Pathname.new("~/.config/zoom/rc").) config = djinni_env["config"] config.default cache = djinni_env["cache"] cache.clear # Update prompt default = config.get_current_profile_name prompt_color = djinni_env["prompt_color"] if (prompt_color) prompt = "zoom(#{default})> ".send(prompt_color) else prompt = "zoom(#{default})> " end djinni_env["djinni_prompt"] = prompt end |
#usage ⇒ Object
36 37 38 39 |
# File 'lib/zoom/wish/reset_wish.rb', line 36 def usage puts("#{aliases.join(", ")}") puts(" #{description}.") end |