Class: Pry::Command::Ls::Formatter

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_pry_) ⇒ Formatter

Returns a new instance of Formatter.



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

def initialize(_pry_)
  @_pry_ = _pry_
  @target = _pry_.current_context
end

Instance Attribute Details

#_pry_Object (readonly)

Returns the value of attribute pry.



5
6
7
# File 'lib/pry/commands/ls/formatter.rb', line 5

def _pry_
  @_pry_
end

#grep=(value) ⇒ Object

Sets the attribute grep

Parameters:

  • value

    the value to set the attribute grep to.



4
5
6
# File 'lib/pry/commands/ls/formatter.rb', line 4

def grep=(value)
  @grep = value
end

Instance Method Details

#write_outObject



12
13
14
15
# File 'lib/pry/commands/ls/formatter.rb', line 12

def write_out
  return false unless correct_opts?
  output_self
end