Class: Pry::Command::Ls::LsEntity
- Defined in:
- lib/pry/commands/ls/ls_entity.rb
Instance Attribute Summary collapse
-
#pry_instance ⇒ Object
readonly
Returns the value of attribute pry_instance.
Instance Method Summary collapse
- #entities_table ⇒ Object
-
#initialize(opts) ⇒ LsEntity
constructor
A new instance of LsEntity.
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_instance ⇒ Object (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_table ⇒ Object
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 |