Method: Mtree::FileSpecification#to_s
- Defined in:
- lib/mtree/file_specification.rb
#to_s(options = {}) ⇒ Object
128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/mtree/file_specification.rb', line 128 def to_s( = {}) descendent = '' if children.any? descendent = children.map do |child| child.to_s() end.join descendent.gsub!(/^/, ' ') if [:indent] end "#{filename} #{attributes}\n#{descendent}..\n" end |