class Hawker::Drivers::Github

Public Instance Methods

company() click to toggle source

The current user company

@return [String]

# File lib/hawker/drivers/github.rb, line 22
def company
  node_text html.at("li[itemprop='worksFor'] div")
end
followers() click to toggle source

The count of users following the current user

@return [Integer]

# File lib/hawker/drivers/github.rb, line 58
def followers
  node_text(html.at("a[title='Followers'] span.Counter")).to_i
end
following() click to toggle source

The count of users that the current user is following

@return [Integer]

# File lib/hawker/drivers/github.rb, line 65
def following
  node_text(html.at("a[title='Following'] span.Counter")).to_i
end
location() click to toggle source

The current user location

@return [String]

# File lib/hawker/drivers/github.rb, line 29
def location
  node_text html.at("li[itemprop='homeLocation'] span")
end
name() click to toggle source

The current user full name

@return [String]

# File lib/hawker/drivers/github.rb, line 8
def name
  node_text html.at("h1.vcard-names span.vcard-fullname[itemprop='name']")
end
repositories() click to toggle source

The count of repositiories owned by the current user

@return [Integer]

# File lib/hawker/drivers/github.rb, line 44
def repositories
  node_text(html.at("a[title='Repositories'] span.Counter")).to_i
end
stars() click to toggle source

The count of stars that the current user gave

@return [Integer]

# File lib/hawker/drivers/github.rb, line 51
def stars
  node_text(html.at("a[title='Stars'] span.Counter")).to_i
end
username() click to toggle source

The current user nickname

@return [String]

# File lib/hawker/drivers/github.rb, line 15
def username
  node_text html.at("h1.vcard-names span.vcard-username[itemprop='additionalName']")
end
website() click to toggle source

The current user website

@return [String]

# File lib/hawker/drivers/github.rb, line 36
def website
  node = html.at("li[itemprop='url'] a")
  node[:href] unless node.nil?
end