Sha256: 32b6a628564119d783fd702ac46c777b4a4221045d5947950c583b5d9db407cd
Contents?: true
Size: 485 Bytes
Versions: 1
Compression:
Stored size: 485 Bytes
Contents
Ego.plugin do |robot| robot.can 'execute system commands' robot.provide :system do |*args| debug 'Running system with arguments %s.', args unless Kernel.system(*args) alert 'Sorry, there was a problem running %s.', args.first end end robot.can 'tell you your login name' robot.on( /^what(?:'?s| is) my (?:user|login)? ?name/i => 5, /^who am I(?: logged in as)?/i => 5, ) do say 'You are currently logged in as:' system 'who' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ego-0.5.0 | lib/ego/plugins/system.rb |