class FolderStash::Errors::TreeLimitExceededError

Error that is raised when the number of items in a tree has exceeded the maximum number allowed in a tree.

Attributes

subdir_limit[R]

Number of items allowed in a subdirectory.

subdirs[R]

Number of subdirectories in a given path (branch) of the tree.

tree_limit[R]

Total number of items allowed in a tree.

Public Class Methods

new(msg = nil, tree: nil) click to toggle source
Calls superclass method
# File lib/folder_stash/errors/tree_limit_exceeded_error.rb, line 17
def initialize(msg = nil, tree: nil)
  @subdirs = tree.subdirectories
  @subdir_limit = tree.folder_limit
  @tree_limit = tree.tree_limit
  msg ||= 'The storage tree has reached the limit of allowed items:'\
          " #{subdir_limit} items in #{subdirs} subdirectories"\
          " (#{tree_limit} allowd items in total)."
  super msg
end