module Github class Repo attr_reader :info def initialize(repo_info, token) store(repo_info) store_token(token) end def language @info['language'] end def name @info['name'] end def owner_login @info['owner']['login'] end def forked? @info['fork'] end def url @info['html_url'] end def commits_url @info['commits_url'].split('{')[0] end def languages_url @info['languages_url'] end def access_token self.info['access_token'] end def commits request(commits_url, access_token) end def languages request(languages_url, access_token) end private def store(repo) @info||={} @info.merge!(repo) end def store_token(token) @info['access_token'] = token end end end