Class: Ghub::Endpoints::Users::Actions::Show

Inherits:
Object
  • Object
show all
Includes:
Pipeable
Defined in:
lib/ghub/endpoints/users/actions/show.rb

Overview

Handles a user show action.

Instance Method Summary collapse

Instance Method Details

#call(id, **parameters) ⇒ Object



15
16
17
18
19
20
# File 'lib/ghub/endpoints/users/actions/show.rb', line 15

def call id, **parameters
  pipe api.get("users/#{id}", **parameters),
       try(:parse, catch: JSON::ParserError),
       validate(response, as: :to_h),
       to(model, :for)
end