Class: Simrb::Scommand
- Inherits:
-
Object
- Object
- Simrb::Scommand
- Defined in:
- lib/simrb/comd.rb
Instance Method Summary collapse
Instance Method Details
#run(args = []) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/simrb/comd.rb', line 10 def run args = [] @output = [] cmd = args.empty? ? '' : args.shift if Scommand.private_method_defined? cmd self.send(cmd, args) else @output << ">> WARNING: No #{cmd} command found >>" help end Simrb.p(@output.empty? ? 'Implemented complete' : @output) end |