lib/nicoquery/object_mapper/video_array.rb in nicoquery-0.1.6.1 vs lib/nicoquery/object_mapper/video_array.rb in nicoquery-0.1.7

- old
+ new

@@ -29,10 +29,14 @@ class Video def initialize(parsed_xml) @hash = parsed_xml end + def community? + @hash['thread']['community_id'].present? + end + def video_id @hash['video']['id'] end def thread_id @@ -80,9 +84,13 @@ @hash['video']['mylist_counter'].to_i end def size_low @hash['video']['size_low'].to_i + end + + def community_id + @hash['thread']['community_id'].to_i end def tags @hash['tags']['tag_info'].each_with_object([]) do |tag, array| array << { text: tag['tag'] }