module Termlib::Helper::Base
Constants
- DEFAULT_COLOR
- DEFAULT_TEXT_COLOR
Protected Instance Methods
define_commands(o)
click to toggle source
# File lib/termlib/base.rb, line 25 def define_commands(o) o.each_pair{|k, v| @@term_commands[k] = v } end
hook_commands()
click to toggle source
# File lib/termlib/base.rb, line 31 def hook_commands src = "" help = "this.write([" @@term_commands.each_pair{|key, value| src << "#\n if cmd=='#{key}'\n #{value[:exec]}" help << "'#{key} ... #{value[:help]}'," } help << "])\n" src << "\n if cmd=='help'\n #{help}" end