Sha256: ccbf1ef5f9635b5c4291f3061f05ef6983aea2939afd2ca4ab9818b25fe0bbfb

Contents?: true

Size: 574 Bytes

Versions: 9

Compression:

Stored size: 574 Bytes

Contents

require 'mustache'

class CrazyRecursive < Mustache
  self.path = File.dirname(__FILE__)

  def top_nodes
    [{ :contents => "1",
       :children =>
       [{ :contents => "2",
          :children =>
          [{ :contents => "3",
             :children => []
           }]
        },
        { :contents => "4",
          :children =>
          [{ :contents => "5",
             :children =>
             [{ :contents => "6",
                :children => []
              }]
           }]
        }]
     }]
  end
end

if $0 == __FILE__
  puts CrazyRecursive.to_html
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
zine_brewer-1.5.0 vendor/bundle/ruby/2.7.0/gems/mustache-1.1.1/test/fixtures/crazy_recursive.rb
zine_brewer-1.3.0 vendor/bundle/ruby/2.7.0/gems/mustache-1.1.1/test/fixtures/crazy_recursive.rb
mustache-1.1.1 test/fixtures/crazy_recursive.rb
mustache-1.1.0 test/fixtures/crazy_recursive.rb
mustache-1.0.5 test/fixtures/crazy_recursive.rb
mustache-1.0.3 test/fixtures/crazy_recursive.rb
mustache-1.0.2 test/fixtures/crazy_recursive.rb
mustache-1.0.1 test/fixtures/crazy_recursive.rb
mustache-1.0.0 test/fixtures/crazy_recursive.rb