require_relative 'base' require_relative 'tag_group' class WCC::Media::Tag < WCC::Media::Base active_record_shim do endpoint 'tags' filters %w[ name_like ] end %w[ name ].each do |att| define_method att do raw[att] end end def tag_group return unless key = raw.dig('tag_group', 'key') WCC::Media::TagGroup[key.to_sym] end end