Class: Ghub::Endpoints::Branches::Protection::Actions::Update
- Inherits:
-
Object
- Object
- Ghub::Endpoints::Branches::Protection::Actions::Update
- Includes:
- Pipeable
- Defined in:
- lib/ghub/endpoints/branches/protection/actions/update.rb
Overview
Handles a branch projection update action.
Instance Method Summary collapse
Instance Method Details
#call(owner, repository, branch, body, **parameters) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/ghub/endpoints/branches/protection/actions/update.rb', line 22 def call owner, repository, branch, body, **parameters pipe( body, validate(request), insert("repos/#{owner}/#{repository}/branches/#{branch}/protection", at: 0), insert(parameters), to(api, :put), try(:parse, catch: JSON::ParserError), validate(response, as: :to_h), to(model, :for) ) end |