class Google::Scholar::ArticleSummary

Public Class Methods

new(doc) click to toggle source
# File lib/google/scholar/article_summary.rb, line 4
def initialize(doc)
  @document = doc
end

Public Instance Methods

authors() click to toggle source
# File lib/google/scholar/article_summary.rb, line 10
def authors
  @authors ||= @document.css("#col-title span:first").text
end
citations() click to toggle source
# File lib/google/scholar/article_summary.rb, line 16
def citations
  @citations ||= @document.css("#col-citedby a:first").text.to_i
end
full_article_url() click to toggle source
# File lib/google/scholar/article_summary.rb, line 22
def full_article_url
  @full_article_url ||= "#{Google::Scholar.google_url}#{@document.css("#col-title a:first").attr("href").text}"
end
publisher() click to toggle source
# File lib/google/scholar/article_summary.rb, line 13
def publisher
  @publisher ||= @document.css("#col-title span:last").text
end
title() click to toggle source
# File lib/google/scholar/article_summary.rb, line 7
def title
  @title ||= @document.css("#col-title a:first").text
end
year() click to toggle source
# File lib/google/scholar/article_summary.rb, line 19
def year
  @year ||= @document.css("#col-year").text.to_i
end