Treeview
TreeView
Installation
Add this line to your application's Gemfile:
gem 'treeview'
And then execute:
$ bundle
Or install it yourself as:
$ gem install treeview
Usage
require 'treeview'
dir = [
{
:Applications => [
:'Safari.app'
]
},
{
:Users => [
{
:mocchi => [
:bin,:Document
]
}
]
}
]
puts TreeView::tree(dir)
#|__Applications
#| \__Safari.app
#\__Users
# \__mocchi
# |__bin
# \__Document
Contributing
- Fork it ( https://github.com/[my-github-username]/treeview/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request