class Lookbook::PreviewGroup

def hierarchy_depth

def hierarchy_depth
  @preview.lookbook_hierarchy_depth + 1
end

def id

def id
  path.underscore.tr("_", "-")
end

def initialize(name, preview, examples)

def initialize(name, preview, examples)
  @name = name
  @preview = preview
  @examples = examples
end

def label

def label
  name.titleize
end

def matchers

def matchers
  [@preview.label, label].map { |m| m.gsub(/\s/, "").downcase }
end

def path

def path
  "#{@preview.lookbook_path}/#{name}"
end

def type

def type
  :group
end