Class: Pry::Command::Ls::LsEntity

Inherits:
Object
  • Object
show all
Defined in:
lib/pry/commands/ls/ls_entity.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ LsEntity

Returns a new instance of LsEntity.



9
10
11
12
13
14
15
16
# File 'lib/pry/commands/ls/ls_entity.rb', line 9

def initialize(opts)
  @interrogatee = opts[:interrogatee]
  @no_user_opts = opts[:no_user_opts]
  @opts = opts[:opts]
  @args = opts[:args]
  @grep = Grep.new(Regexp.new(opts[:opts][:G] || '.'))
  @pry_instance = opts.delete(:pry_instance)
end

Instance Attribute Details

#pry_instanceObject (readonly)

Returns the value of attribute pry_instance.



7
8
9
# File 'lib/pry/commands/ls/ls_entity.rb', line 7

def pry_instance
  @pry_instance
end

Instance Method Details

#entities_tableObject



18
19
20
# File 'lib/pry/commands/ls/ls_entity.rb', line 18

def entities_table
  entities.map(&:write_out).select { |o| o }.join('')
end