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

# class Pry::Command::Ls::LocalNames

### Public Class Methods

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

    # File lib/pry/commands/ls/local_names.rb, line 5
    def initialize(no_user_opts, args, _pry_)
      super(_pry_)
      @no_user_opts = no_user_opts
      @args = args
      @sticky_locals = _pry_.sticky_locals
    end

### Public Instance Methods

correct_opts?() click to toggle source
Calls superclass method

    # File lib/pry/commands/ls/local_names.rb, line 12
    def correct_opts?
      super || (@no_user_opts && @args.empty?)
    end

output_self() click to toggle source

    # File lib/pry/commands/ls/local_names.rb, line 16
    def output_self
      local_vars = grep.regexp[@target.eval('local_variables')]
      output_section('locals', format(local_vars))
    end