class NicoAPI::Parser::TagSearch::Item::Description

Attributes

raw_text[R]

Public Class Methods

new(raw_text) click to toggle source
# File lib/nicoapi/parser/tag_search.rb, line 77
def initialize(raw_text)
  @raw_text = raw_text.to_s
end

Public Instance Methods

community_references() click to toggle source
# File lib/nicoapi/parser/tag_search.rb, line 95
def community_references
  text.scan /co\d{1,}/
end
movie_references() click to toggle source
# File lib/nicoapi/parser/tag_search.rb, line 86
def movie_references
  # is this the high road?
  text.scan(/((sm|nm)\d{1,})/).map {|e| e[0]}
end
mylist_references() click to toggle source
# File lib/nicoapi/parser/tag_search.rb, line 91
def mylist_references
  text.scan /(?<=mylist\/)\d{1,}/
end
seiga_references() click to toggle source
# File lib/nicoapi/parser/tag_search.rb, line 99
def seiga_references
  text.scan /im\d{1,}/
end
text() click to toggle source
# File lib/nicoapi/parser/tag_search.rb, line 81
def text
  @raw_text.scan /(?<=class\=\"nico\-description\"\>).{1,}(?=\<\/p\>)/
  $&
end