Class: Pry::Command::Ls::LocalNames
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/pry-0.14.2/lib/pry/commands/ls/local_names.rb
Instance Attribute Summary
Attributes inherited from Formatter
Instance Method Summary collapse
- #correct_opts? ⇒ Boolean
-
#initialize(no_user_opts, args, pry_instance) ⇒ LocalNames
constructor
A new instance of LocalNames.
- #output_self ⇒ Object
Methods inherited from Formatter
Constructor Details
#initialize(no_user_opts, args, pry_instance) ⇒ LocalNames
Returns a new instance of LocalNames.
7 8 9 10 11 12 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/pry-0.14.2/lib/pry/commands/ls/local_names.rb', line 7 def initialize(no_user_opts, args, pry_instance) super(pry_instance) @no_user_opts = no_user_opts @args = args @sticky_locals = pry_instance.sticky_locals end |
Instance Method Details
#correct_opts? ⇒ Boolean
14 15 16 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/pry-0.14.2/lib/pry/commands/ls/local_names.rb', line 14 def correct_opts? super || (@no_user_opts && @args.empty?) end |
#output_self ⇒ Object
18 19 20 21 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/pry-0.14.2/lib/pry/commands/ls/local_names.rb', line 18 def output_self local_vars = grep.regexp[@target.eval('local_variables')] output_section('locals', format(local_vars)) end |