debian-mirror-gitlab/lib/github/user.rb

25 lines
362 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
module Github
class User
attr_reader :username, :options
def initialize(username, options)
@username = username
@options = options
end
def get
client.get(user_url).body
end
private
def client
@client ||= Github::Client.new(options)
end
def user_url
"/users/#{username}"
end
end
end