Sha256: 1d18e46dcd8adb27e67d5a79887611196caa978d5aa8d1153a7e97afc72398cd

Contents?: true

Size: 326 Bytes

Versions: 13

Compression:

Stored size: 326 Bytes

Contents

module PufferTreeHelper

  def puffer_tree hash, options = {}, &block
    content_tag :ul, options do
      puffer_tree_node hash, &block
    end if hash.present?
  end

  def puffer_tree_node hash, &block
    hash.keys.each do |node|
      block.call node, render_tree(hash[node], &block)
    end if hash.present?
  end

end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
puffer-0.0.32 app/helpers/puffer_tree_helper.rb
puffer-0.0.31 app/helpers/puffer_tree_helper.rb
puffer-0.0.30 app/helpers/puffer_tree_helper.rb
puffer-0.0.29 app/helpers/puffer_tree_helper.rb
puffer-0.0.28 app/helpers/puffer_tree_helper.rb
puffer-0.0.26 app/helpers/puffer_tree_helper.rb
puffer-0.0.25 app/helpers/puffer_tree_helper.rb
puffer-0.0.24 app/helpers/puffer_tree_helper.rb
puffer-0.0.23 app/helpers/puffer_tree_helper.rb
puffer-0.0.22 app/helpers/puffer_tree_helper.rb
puffer-0.0.21 app/helpers/puffer_tree_helper.rb
puffer_pages-0.0.15 app/helpers/puffer_tree_helper.rb
puffer_pages-0.0.14 app/helpers/puffer_tree_helper.rb