class method self.current

Ruby on Rails 8.1.2

Since v8.1.2

Signature

self.current()

Returns the current editor pattern if it is known. First check for the RAILS_EDITOR environment variable, and if it’s missing, check for the EDITOR environment variable.

Source
# File activesupport/lib/active_support/editor.rb, line 28
      def current
        if @current == false
          @current = if editor_name = ENV["RAILS_EDITOR"] || ENV["EDITOR"]
            @editors[editor_name]
          end
        end
        @current
      end

Defined in activesupport/lib/active_support/editor.rb line 28 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::Editor

Type at least 2 characters to search.

↑↓ navigate · open · esc close