Class: Djinni::Wish::Clear

Inherits:
Djinni::Wish show all
Defined in:
lib/djinni/wish/clear.rb

Instance Method Summary collapse

Methods inherited from Djinni::Wish

#tab_complete

Instance Method Details

#aliasesObject



2
3
4
# File 'lib/djinni/wish/clear.rb', line 2

def aliases
    return ["clear", "cls"]
end

#descriptionObject



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

#usageObject



15
16
17
18
# File 'lib/djinni/wish/clear.rb', line 15

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