139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
# File 'lib/xbrlware-extras/linkbase.rb', line 139
def print_tree(indent_count=0)
indent = " " * indent_count
output = "#{indent} #{@label}"
@items.each do |item|
period=item.context.period
period_str = period.is_duration? ? "#{period.value["start_date"]} to #{period.value["end_date"]}" : "#{period.value}"
output += " [#{item.def["xbrli:balance"]}]" unless item.def.nil?
output += " (#{period_str}) = #{item.value}" unless item.nil?
end
puts indent + output
@children.each { |child| child.print_tree(indent_count+1) }
end
|