Sha256: 200e8a1044f33378a8e216cf60563a9861c6c2077bb0ece966878fc0769df8b3
Contents?: true
Size: 680 Bytes
Versions: 20
Compression:
Stored size: 680 Bytes
Contents
module NicoQuery module ObjectMapper class Description attr_reader :raw_text, :movie_references, :movie_references, :community_references, :seiga_references def initialize(raw_text) @raw_text = raw_text.to_s end def text @raw_text end def movie_references # is this the high road? text.scan(/((sm|nm)\d{1,})/).map {|e| e[0]} end def mylist_references text.scan(/(?<=mylist\/)\d{1,}/).map(&:to_i) end def community_references text.scan(/co\d{1,}/) end def seiga_references text.scan(/im\d{1,}/) end end end end
Version data entries
20 entries across 20 versions & 1 rubygems