class DEBUGGER__::AbbrevCommand

公共类方法

new(config) 点击切换源码

config: { type: [commands…], … }

# File debug-1.10.0/lib/debug/abbrev_command.rb, line 48
def initialize config
  @trie = TrieNode.new
  build config
end

公共实例方法

私有实例方法

build(config) 点击切换源码
# File debug-1.10.0/lib/debug/abbrev_command.rb, line 53
        def build config
  config.each do |type, commands|
    commands.each do |command|
      trie = @trie
      command.each_char do |c|
        trie = trie.append(c, type)
      end
    end
  end
end