class SuperDiff::ObjectInspection::Nodes::AsSingleLine
Public Class Methods
method_name()
click to toggle source
# File lib/super_diff/object_inspection/nodes/as_single_line.rb, line 9 def self.method_name :as_single_line end
node_name()
click to toggle source
# File lib/super_diff/object_inspection/nodes/as_single_line.rb, line 5 def self.node_name :as_single_line end
Public Instance Methods
render_to_lines(object, type:, indentation_level:)
click to toggle source
# File lib/super_diff/object_inspection/nodes/as_single_line.rb, line 21 def render_to_lines(object, type:, indentation_level:) [ SuperDiff::Line.new( type: type, indentation_level: indentation_level, value: render_to_string(object), ), ] end
render_to_string(object)
click to toggle source
# File lib/super_diff/object_inspection/nodes/as_single_line.rb, line 13 def render_to_string(object) if block render_to_string_in_subtree(object) else immediate_value.to_s end end