Class: Ghub::Endpoints::Users::Actions::Index
- Inherits:
-
Object
- Object
- Ghub::Endpoints::Users::Actions::Index
- Includes:
- Pipeable
- Defined in:
- lib/ghub/endpoints/users/actions/index.rb
Overview
Handles a user index action.
Instance Method Summary collapse
Instance Method Details
#call(**parameters) ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ghub/endpoints/users/actions/index.rb', line 15 def call **parameters pipe( api.get("users", **parameters), try(:parse, catch: JSON::ParserError), fmap { |body| {body:} }, validate(response, as: :to_h), as(:fetch, :body), map { |item| model.for(**item) } ) end |