class Iqdb::Client::Parser::Result

Attributes

nokogiri_obj[R]

Public Class Methods

new(nokogiri_obj) click to toggle source
# File lib/iqdb/client/parser/result.rb, line 7
def initialize(nokogiri_obj)
  @nokogiri_obj = nokogiri_obj
end

Public Instance Methods

alt() click to toggle source
# File lib/iqdb/client/parser/result.rb, line 15
def alt
  @alt ||= Alt.new(@nokogiri_obj.xpath('.//td[@class="image"]//img[1]/@alt').text)
end
info() click to toggle source
# File lib/iqdb/client/parser/result.rb, line 19
def info
  { link: link, tags: alt.tags, rating: alt.rating }
end