Sha256: 6dab833e340f8010f73a5112142eef256fd9eed9ce08282b96f5555b50c5422f

Contents?: true

Size: 478 Bytes

Versions: 12

Compression:

Stored size: 478 Bytes

Contents

module ClosureTree
  module HashTree
    extend ActiveSupport::Concern

    def hash_tree(options = {})
      _ct.hash_tree(self_and_descendants, options[:limit_depth])
    end

    module ClassMethods

      # There is no default depth limit. This might be crazy-big, depending
      # on your tree shape. Hash huge trees at your own peril!
      def hash_tree(options = {})
        _ct.hash_tree(_ct.default_tree_scope(all, options[:limit_depth]))
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
closure_tree-7.4.0 lib/closure_tree/hash_tree.rb
closure_tree-7.4.0.rc1 lib/closure_tree/hash_tree.rb
closure_tree-7.3.0 lib/closure_tree/hash_tree.rb
closure_tree-7.2.0 lib/closure_tree/hash_tree.rb
closure_tree-7.1.0 lib/closure_tree/hash_tree.rb
closure_tree-7.0.0 lib/closure_tree/hash_tree.rb
closure_tree-6.6.0 lib/closure_tree/hash_tree.rb
closure_tree-6.5.0 lib/closure_tree/hash_tree.rb
closure_tree-6.4.0 lib/closure_tree/hash_tree.rb
closure_tree-6.3.0 lib/closure_tree/hash_tree.rb
closure_tree-6.2.0 lib/closure_tree/hash_tree.rb
closure_tree-6.1.0 lib/closure_tree/hash_tree.rb