Class: JsonInference::RootNode
Instance Method Summary
collapse
Methods inherited from BaseNode
#<<, #each_sub_node, #indent, #initialize
Instance Method Details
#indent_level ⇒ Object
3
4
5
|
# File 'lib/json-inference/root_node.rb', line 3
def indent_level
-1
end
|
#selector ⇒ Object
7
8
9
|
# File 'lib/json-inference/root_node.rb', line 7
def selector
':root'
end
|
#to_s(documents_count) ⇒ Object
11
12
13
14
15
16
17
18
|
# File 'lib/json-inference/root_node.rb', line 11
def to_s(documents_count)
str = ""
each_sub_node do |sub_node|
str << sub_node.to_s(documents_count)
str << "\n"
end
str
end
|