Class: PwdWish
- Inherits:
-
Djinni::Wish
- Object
- Djinni::Wish
- PwdWish
- Defined in:
- lib/jenkins_shell/wish/pwd_wish.rb
Instance Method Summary collapse
- #aliases ⇒ Object
- #description ⇒ Object
- #execute(args, djinni_env = Hash.new) ⇒ Object
- #usage ⇒ Object
Instance Method Details
#aliases ⇒ Object
4 5 6 |
# File 'lib/jenkins_shell/wish/pwd_wish.rb', line 4 def aliases return ["pwd"] end |
#description ⇒ Object
8 9 10 |
# File 'lib/jenkins_shell/wish/pwd_wish.rb', line 8 def description return "Show path of current path" end |
#execute(args, djinni_env = Hash.new) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/jenkins_shell/wish/pwd_wish.rb', line 12 def execute(args, djinni_env = Hash.new) usage if (!args.empty?) jsh = djinni_env["jsh"] puts jsh.pwd if (args.empty?) djinni_env["djinni_prompt"] = "#{jsh.cwd}> ".light_white end |
#usage ⇒ Object
20 21 22 23 |
# File 'lib/jenkins_shell/wish/pwd_wish.rb', line 20 def usage puts aliases.join(", ") puts " #{description}." end |