Class: WCC::Media::TagGroup

Inherits:
Data::EnumeratedType
  • Object
show all
Defined in:
lib/wcc/media/tag_group.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.dbObject



15
16
17
# File 'lib/wcc/media/tag_group.rb', line 15

def self.db
  TAG_GROUPS
end

Instance Method Details

#matches?(value) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/wcc/media/tag_group.rb', line 7

def matches?(value)
  [id, key, self].include?(value)
end

#tagsObject



11
12
13
# File 'lib/wcc/media/tag_group.rb', line 11

def tags
  Tag.where(tag_group_id: id)
end