Class: FetchFollowers
- Inherits:
-
Object
- Object
- FetchFollowers
- Includes:
- Interactor
- Defined in:
- lib/fetch_followers.rb
Overview
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/fetch_followers.rb', line 5 def call client = GithubApiClient.new followers = client.followers(context.username) if followers.response.code == "200" followers = followers.parsed_response return context.followers = followers else context.error = followers.response. context.fail! end end |