Class: Sipity::Runners::SipRunners::New

Inherits:
BaseRunner
  • Object
show all
Defined in:
app/runners/sipity/runners/sip_runners.rb

Overview

Responsible for building the model for a New Sip

Instance Attribute Summary

Attributes inherited from BaseRunner

#authentication_layer, #authorization_layer

Instance Method Summary collapse

Methods inherited from BaseRunner

#authentication_layer_that_authenticates_anything, #authentication_layer_that_uses_context_authentication, #authorization_layer_that_authorizes_everything, #authorization_layer_with_enforcement, #enforce_authentication!, #initialize

Constructor Details

This class inherits a constructor from Sipity::Runners::BaseRunner

Instance Method Details

#runObject



10
11
12
13
14
15
# File 'app/runners/sipity/runners/sip_runners.rb', line 10

def run
  sip = repository.build_create_sip_form
  authorization_layer.enforce!(create?: sip) do
    callback(:success, sip)
  end
end