lib/wcc/media/message.rb in wcc-media-client-0.4.8 vs lib/wcc/media/message.rb in wcc-media-client-0.4.9
- old
+ new
@@ -74,9 +74,14 @@
def has_video? # rubocop:disable Naming/PredicateName
assets.each_pair
.any? { |k, v| /video/.match(k) && v && !v.empty? }
end
+ def has_audio? # rubocop:disable Naming/PredicateName
+ assets.each_pair
+ .any? { |k, v| /^audio/.match(k) && v && !v.empty? }
+ end
+
def to_param
"#{id}-#{slug}"
end
WCC::Media::TagGroup.all.each do |tag_group|