123456789_123456789_123456789_123456789_123456789_

Class: Prism::InspectVisitor::Replace

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: lib/prism/inspect_visitor.rb

Overview

Most of the time, we can simply pass down the indent to the next node. However, when we are inside a list we want some extra special formatting when we hit an element in that list. In this case, we have a special command that replaces the subsequent indent with the given value.

Class Method Summary

Instance Attribute Summary

Constructor Details

.new(value) ⇒ Replace

[ GitHub ]

  
# File 'lib/prism/inspect_visitor.rb', line 23

def initialize(value)
  @value = value
end

Instance Attribute Details

#value (readonly)

[ GitHub ]

  
# File 'lib/prism/inspect_visitor.rb', line 21

attr_reader :value