Sha256: 228e3d0a4e8b9bfbd30fbcbf45b669fcd3aac70a6babc6ae74415c5531aa49ee

Contents?: true

Size: 538 Bytes

Versions: 70

Compression:

Stored size: 538 Bytes

Contents

module Redcar
  class Declarations
    class CompletionSource
      def initialize(_, project)
        @project = project
      end
      
      def alternatives(prefix)
        if @project
          word_list = AutoCompleter::WordList.new
          tags = Declarations.tags_for_path(Declarations.file_path(@project))
          tags.keys.each do |tag| 
            if tag[0..(prefix.length-1)] == prefix
              word_list.add_word(tag, 10000)
            end
          end
          word_list
        end
      end
    end
  end
end

Version data entries

70 entries across 70 versions & 2 rubygems

Version Path
redcar-0.9.0 plugins/declarations/lib/declarations/completion_source.rb
redcar-0.8.1 plugins/declarations/lib/declarations/completion_source.rb
redcar-0.8 plugins/declarations/lib/declarations/completion_source.rb
redcar-0.7 plugins/declarations/lib/declarations/completion_source.rb
redcar-0.6.1 plugins/declarations/lib/declarations/completion_source.rb
redcar-0.6 plugins/declarations/lib/declarations/completion_source.rb
redcar-0.6.1dev plugins/declarations/lib/declarations/completion_source.rb
redcar-0.5.1 plugins/declarations/lib/declarations/completion_source.rb
redcar-0.5 plugins/declarations/lib/declarations/completion_source.rb
redcar-0.5.6dev plugins/declarations/lib/declarations/completion_source.rb
redcar-0.5.5dev plugins/declarations/lib/declarations/completion_source.rb
redcar-0.5.4dev plugins/declarations/lib/declarations/completion_source.rb
redcar-0.5.3dev plugins/declarations/lib/declarations/completion_source.rb
redcar-0.5.2dev plugins/declarations/lib/declarations/completion_source.rb
redcar-0.5.1dev plugins/declarations/lib/declarations/completion_source.rb
redcar-0.4.1 plugins/declarations/lib/declarations/completion_source.rb
redcar-0.4 plugins/declarations/lib/declarations/completion_source.rb
redcar-0.3.10.1dev plugins/declarations/lib/declarations/completion_source.rb
redcar-0.3.10.0dev plugins/declarations/lib/declarations/completion_source.rb
redcar-0.3.9 plugins/declarations/lib/declarations/completion_source.rb