Class: Geet::Github::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/geet/github/account.rb

Instance Method Summary collapse

Constructor Details

#initialize(api_interface) ⇒ Account

Returns a new instance of Account.



6
7
8
# File 'lib/geet/github/account.rb', line 6

def initialize(api_interface)
  @api_interface = api_interface
end

Instance Method Details

#authenticated_userObject



10
11
12
13
14
15
16
# File 'lib/geet/github/account.rb', line 10

def authenticated_user
  api_path = '/user'

  response = @api_interface.send_request(api_path)

  response.fetch('login')
end