class Pry::Command::Ls::Globals - pry-0.10.1 Documentation

# class Pry::Command::Ls::Globals

### Constants

BUILTIN_GLOBALS

  Taken from “puts global_variables.inspect”.

PSEUDO_GLOBALS

  `$SAFE` and `$?` are thread-local, the exception stuff only works in a rescue clause, everything else is basically a local variable with a `$` in its name.

### Public Class Methods

new(opts, _pry_) click to toggle source
Calls superclass method Pry::Command::Ls::Formatter.new

    # File lib/pry/commands/ls/globals.rb, line 22
    def initialize(opts, _pry_)
      super(_pry_)
      @default_switch = opts[:globals]
    end

### Public Instance Methods

output_self() click to toggle source

    # File lib/pry/commands/ls/globals.rb, line 27
    def output_self
      variables = format(@target.eval('global_variables'))
      output_section('global variables', grep.regexp[variables])
    end