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.



17
18
19
20
21
22
23
24
# File 'lib/pry/commands/ls/ls_entity.rb', line 17

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_ = opts.delete(:_pry_)
end

Instance Attribute Details

#_pry_Object (readonly)

Returns the value of attribute pry.



15
16
17
# File 'lib/pry/commands/ls/ls_entity.rb', line 15

def _pry_
  @_pry_
end

Instance Method Details

#entities_tableObject



26
27
28
# File 'lib/pry/commands/ls/ls_entity.rb', line 26

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