Module: Doing::WWIDTags

Included in:
WWID
Defined in:
lib/doing/wwid/tags.rb

Overview

Tag methods for WWID class

Instance Method Summary collapse

Instance Method Details

#all_tags(items, opt: {}, counts: false) ⇒ Hash, Array

List all tags that exist on given items

Parameters:

  • items (Array)

    array of Item

  • opt (Hash) (defaults to: {})

    additional options

  • counts (Boolean) (defaults to: false)

    Include tag counts in results

Returns:

  • (Hash)

    if counts is true, returns a hash with { tag: count }.

  • (Array)

    If counts is false, returns a simple array of tags.

#tag_groups(items, opt: {}) ⇒ Object