Class: PwdWish

Inherits:
Djinni::Wish
  • Object
show all
Defined in:
lib/builtins/pwd_wish.rb

Instance Method Summary collapse

Instance Method Details

#aliasesObject



4
5
6
# File 'lib/builtins/pwd_wish.rb', line 4

def aliases
    return [ "pwd" ]
end

#descriptionObject



8
9
10
# File 'lib/builtins/pwd_wish.rb', line 8

def description
    return "Show path of current group"
end

#execute(args, djinni_env = {}) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/builtins/pwd_wish.rb', line 12

def execute(args, djinni_env = {})
    if (args.nil? || args.empty?)
        puts djinni_env["cwd"].path
    else
        usage
    end
end

#usageObject



20
21
22
23
# File 'lib/builtins/pwd_wish.rb', line 20

def usage
    puts aliases.join(", ")
    puts "\t#{description}."
end