Class: SuperDiff::ObjectInspection::Nodes::AsPrefixWhenRenderingToLines
- Inherits:
-
Base
- Object
- Base
- SuperDiff::ObjectInspection::Nodes::AsPrefixWhenRenderingToLines
show all
- Defined in:
- lib/super_diff/object_inspection/nodes/as_prefix_when_rendering_to_lines.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#clone_with, #initialize, node_name, #pretty_print, #render
Class Method Details
.method_name ⇒ Object
9
10
11
|
# File 'lib/super_diff/object_inspection/nodes/as_prefix_when_rendering_to_lines.rb', line 9
def self.method_name
:as_prefix_when_rendering_to_lines
end
|
.name ⇒ Object
5
6
7
|
# File 'lib/super_diff/object_inspection/nodes/as_prefix_when_rendering_to_lines.rb', line 5
def self.name
:as_prefix_when_rendering_to_lines
end
|
Instance Method Details
#render_to_lines(object) ⇒ Object
17
18
19
|
# File 'lib/super_diff/object_inspection/nodes/as_prefix_when_rendering_to_lines.rb', line 17
def render_to_lines(object, **)
ObjectInspection::PrefixForNextNode.new(render_to_string(object))
end
|
#render_to_string(object) ⇒ Object
13
14
15
|
# File 'lib/super_diff/object_inspection/nodes/as_prefix_when_rendering_to_lines.rb', line 13
def render_to_string(object)
block ? render_to_string_in_subtree(object) : immediate_value.to_s
end
|