Sha256: a5b284b84bc92b5c2e0ca6ce2115f3f07ee3dfec87107ee61a712c02e46f2176

Contents?: true

Size: 864 Bytes

Versions: 38

Compression:

Stored size: 864 Bytes

Contents

require 'repl/repl_mirror'
require 'repl/repl_tab'
require 'repl/repl_command'

module Redcar
  class REPL

    DEFAULT_BUFFER_SIZE = 15

    def self.sensitivities
      [
        Sensitivity.new(:open_repl_tab, Redcar.app, false, [:tab_focussed]) do |tab|
          tab and
          tab.is_a?(REPL::Tab) and
          tab.edit_view.document.mirror.is_a?(REPL::ReplMirror)
        end
      ]
    end

    def self.storage
      @storage ||= begin
        storage = Plugin::Storage.new('repl')
        storage.set_default(
          'command_history_buffer_size',
          DEFAULT_BUFFER_SIZE)
        storage.set_default('command_history', {})
        storage
      end
    end

    class OpenREPL < Command
      def open_repl(mirror)
        tab = win.new_tab(Redcar::REPL::Tab)
        tab.repl_mirror = mirror
        tab.focus
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
redcar-0.13 plugins/repl/lib/repl.rb
redcar-dev-0.13.5dev plugins/repl/lib/repl.rb
redcar-dev-0.13.4dev plugins/repl/lib/repl.rb
redcar-dev-0.13.3dev plugins/repl/lib/repl.rb
redcar-dev-0.13.2dev plugins/repl/lib/repl.rb
redcar-dev-0.13.1dev plugins/repl/lib/repl.rb
redcar-0.12.1 plugins/repl/lib/repl.rb
redcar-dev-0.13.0dev plugins/repl/lib/repl.rb
redcar-0.12 plugins/repl/lib/repl.rb
redcar-dev-0.12.27dev plugins/repl/lib/repl.rb
redcar-dev-0.12.26dev plugins/repl/lib/repl.rb
redcar-dev-0.12.25dev plugins/repl/lib/repl.rb
redcar-dev-0.12.24dev plugins/repl/lib/repl.rb
redcar-dev-0.12.23dev plugins/repl/lib/repl.rb
redcar-dev-0.12.22dev plugins/repl/lib/repl.rb
redcar-dev-0.12.21dev plugins/repl/lib/repl.rb
redcar-dev-0.12.20dev plugins/repl/lib/repl.rb
redcar-dev-0.12.19dev plugins/repl/lib/repl.rb
redcar-dev-0.12.18dev plugins/repl/lib/repl.rb
redcar-dev-0.12.17dev plugins/repl/lib/repl.rb