Sha256: b8d45abd321430f67156b24e9e9c79e80cd406b933e01ffab80965f24e973734

Contents?: true

Size: 1.06 KB

Versions: 6

Compression:

Stored size: 1.06 KB

Contents

module Redcar
  class AutoCompleter
    class DocumentController
      include Redcar::Document::Controller
      include Redcar::Document::Controller::ModificationCallbacks
      
      def start_completion
        @in_completion = true
      end
      
      def end_completion
        @in_completion = false
      end
      
      def in_completion?
        @in_completion
      end
      
      def start_modification
        @in_modification = true
      end
      
      def end_modification
        @in_modification = false
      end
      
      def in_modification?
        @in_modification
      end
      
      attr_accessor :index
      attr_accessor :length_of_previous
      attr_accessor :word_list, :word, :left, :right
      
      def before_modify(*_)
      end
      
      def after_modify(*_)
        unless in_modification?
          @in_completion = false
          @index         = 0
          @length_of_previous = nil
          @word_list = nil
          @word = nil
          @left = nil
          @right = nil
        end
      end
      
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
redcar-0.3.4.3 plugins/auto_completer/lib/auto_completer/document_controller.rb
redcar-0.3.4.2 plugins/auto_completer/lib/auto_completer/document_controller.rb
redcar-0.3.4.1 plugins/auto_completer/lib/auto_completer/document_controller.rb
redcar-0.3.4 plugins/auto_completer/lib/auto_completer/document_controller.rb
redcar-0.3.3 plugins/auto_completer/lib/auto_completer/document_controller.rb
redcar-0.3.2dev plugins/auto_completer/lib/auto_completer/document_controller.rb