Class: SuperDiff::Core::InspectionTreeNodes::WhenEmpty
- Inherits:
-
Base
- Object
- Base
- SuperDiff::Core::InspectionTreeNodes::WhenEmpty
show all
- Defined in:
- lib/super_diff/core/inspection_tree_nodes/when_empty.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#clone_with, #initialize, #pretty_print, #render
Class Method Details
.method_name ⇒ Object
11
12
13
|
# File 'lib/super_diff/core/inspection_tree_nodes/when_empty.rb', line 11
def self.method_name
:when_empty
end
|
.node_name ⇒ Object
7
8
9
|
# File 'lib/super_diff/core/inspection_tree_nodes/when_empty.rb', line 7
def self.node_name
:when_empty
end
|
Instance Method Details
#render_to_lines(object, type:, indentation_level:) ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/super_diff/core/inspection_tree_nodes/when_empty.rb', line 19
def render_to_lines(object, type:, indentation_level:)
if empty?(object)
render_to_lines_in_subtree(
object,
type: type,
indentation_level: indentation_level
)
else
[]
end
end
|
#render_to_string(object) ⇒ Object
15
16
17
|
# File 'lib/super_diff/core/inspection_tree_nodes/when_empty.rb', line 15
def render_to_string(object)
empty?(object) ? render_to_string_in_subtree(object) : ''
end
|