Sha256: 0b0123873e76b74f08596c4823a6f59419c718599f147b8218aa24ef12a8d366

Contents?: true

Size: 628 Bytes

Versions: 25

Compression:

Stored size: 628 Bytes

Contents

$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
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

25 entries across 25 versions & 4 rubygems

Version Path
mustache-0.99.8 test/fixtures/crazy_recursive.rb
mustache-0.99.7 test/fixtures/crazy_recursive.rb
mustache-0.99.6 test/fixtures/crazy_recursive.rb
mustache-0.99.5 test/fixtures/crazy_recursive.rb
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/mustache-0.99.4/test/fixtures/crazy_recursive.rb
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/mustache-0.99.4/test/fixtures/crazy_recursive.rb
mustache-bibanon-0.99.5 test/fixtures/crazy_recursive.rb
mustache-0.99.4 test/fixtures/crazy_recursive.rb
mustache-0.99.3 test/fixtures/crazy_recursive.rb
mustache-0.99.2 test/fixtures/crazy_recursive.rb
mustache-0.99.1 test/fixtures/crazy_recursive.rb
mustache-0.99.0 test/fixtures/crazy_recursive.rb
mustache-0.98.0 test/fixtures/crazy_recursive.rb
mustache-0.13.0 test/fixtures/crazy_recursive.rb
mustache-0.12.1 test/fixtures/crazy_recursive.rb
mustache-0.12.0 test/fixtures/crazy_recursive.rb
angry_mob_common_targets-0.1.0 vendor/mustache/test/fixtures/crazy_recursive.rb
mustache-0.11.2 test/fixtures/crazy_recursive.rb
mustache-0.11.1 test/fixtures/crazy_recursive.rb
mustache-0.11.0 test/fixtures/crazy_recursive.rb