class DEBUGGER__::AbbrevCommand

Public Class Methods

new(config) click to toggle source

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

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

Public Instance Methods

Private Instance Methods

build(config) click to toggle source
# File debug-1.9.1/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