lib/rley/formatter/asciitree.rb in rley-0.7.07 vs lib/rley/formatter/asciitree.rb in rley-0.7.08
- old
+ new
@@ -13,11 +13,11 @@
# For each node in curr_path, there is a corresponding string value.
# Allowed string values are: 'first', 'last', 'first_and_last', 'other'
attr_reader(:ranks)
- # @return [String] The character pattern used for rendering
+ # @return [String] The character pattern used for rendering
# a parent - child nesting
attr_reader(:nesting_prefix)
# @return [String] The character pattern used for a blank indentation
attr_reader(:blank_indent)
@@ -97,11 +97,11 @@
end
ranks << rank
end
# 'root', 'first', 'first_and_last', 'last', 'other'
- def path_prefix()
+ def path_prefix
return '' if ranks.empty?
prefix = +''
@ranks.each_with_index do |rank, i|
next if i.zero?
@@ -114,10 +114,10 @@
prefix << blank_indent
end
end
prefix << nesting_prefix
- return prefix
+ prefix
end
def emit(aNode, aSuffix = '')
output.puts("#{path_prefix}#{aNode.symbol.name}#{aSuffix}")
end