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_instance) ⇒ Formatter

Returns a new instance of Formatter.



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

def initialize(pry_instance)
  @pry_instance = pry_instance
  @target = pry_instance.current_context
  @default_switch = nil
end

Instance Attribute Details

#grep=(value) ⇒ Object

Sets the attribute grep

Parameters:

  • value

    the value to set the attribute grep to.



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

def grep=(value)
  @grep = value
end

#pry_instanceObject (readonly)

Returns the value of attribute pry_instance.



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

def pry_instance
  @pry_instance
end

Instance Method Details

#write_outObject



16
17
18
19
20
# File 'lib/pry/commands/ls/formatter.rb', line 16

def write_out
  return false unless correct_opts?

  output_self
end