-
Notifications
You must be signed in to change notification settings - Fork 0
GHULS::Lib
Eli Clemente Gordillo Foster edited this page Nov 3, 2015
·
1 revision
All of these methods are called without the need for a GHULS::Lib instance. In other words, they are called simply as:
require 'ghuls/lib'
GHULS::Lib.method_name(parameters)
Gets the Octokit and colors for the program.
-
opts
(Hash
) The options to use. The keys taht are used by this method are:token
,:pass
, and:user
- (
Hash
) A hash containing objects formatted as{ git: Octokit::Client, colors: JSON }
Gets the next value in an array.
-
single
(Any
) The current value. -
full
(Array
) The main array to parse.
-
Any
The next value in the array.
Gets whether or not the user exists.
-
username
(String
) The user to check. -
github
(Octokit::Client
) The instance of Octokit to use.
-
Boolean
True if the username exists, false if it doesn't.
Gets the repository's in the user's organizations that they have actually contributed to.
-
username
(String
) See#user_exists?
-
github
(Octokit::Client
) See#user_exists?
-
Array
All the repository full names (org/repo) that the user has contributed to.
Gets the language and their bytes for the user.
-
username
(String
) The username to get info for. -
github
(Octokit::Client
) The instance of Octokit.
-
Hash
The languages and their bytes formatted as{ Ruby: 129890, CoffeeScript: 5970 }
Gets the percentage for the given numbers.
-
part
(Fixnum
) The partial value. -
whole
(Fixnum
) The whole value.
-
Fixnum
The percentage that part is of whole.
Gets the defined color for the language from ozh/github-colors.
-
lang
(String
) The language name. -
colors
(Hash
) The hash of colors and languages, obtained from parsing the github-colors JSON.
-
String
The 6 digit hexidecimal color. If there is no color defined for the language, returns a random 6 digit hexidecimal color generated by StringUtility.