Class: Services::CreateCredentialContext
- Inherits:
-
Object
- Object
- Services::CreateCredentialContext
- Defined in:
- app/contexts/services/create_credential_context.rb
Instance Attribute Summary collapse
-
#credentialled_object ⇒ Object
Returns the value of attribute credentialled_object.
-
#params ⇒ Object
Returns the value of attribute params.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(credentialled_object, params) ⇒ CreateCredentialContext
constructor
A new instance of CreateCredentialContext.
Constructor Details
#initialize(credentialled_object, params) ⇒ CreateCredentialContext
Returns a new instance of CreateCredentialContext.
11 12 13 14 15 |
# File 'app/contexts/services/create_credential_context.rb', line 11 def initialize(credentialled_object, params) @credentialled_object = credentialled_object @params = params @credentialled_object.extend Services::CredentialCreator end |
Instance Attribute Details
#credentialled_object ⇒ Object
Returns the value of attribute credentialled_object.
5 6 7 |
# File 'app/contexts/services/create_credential_context.rb', line 5 def credentialled_object @credentialled_object end |
#params ⇒ Object
Returns the value of attribute params.
5 6 7 |
# File 'app/contexts/services/create_credential_context.rb', line 5 def params @params end |
Class Method Details
.call(credentialled_object, params) ⇒ Object
7 8 9 |
# File 'app/contexts/services/create_credential_context.rb', line 7 def self.call(credentialled_object, params) CreateCredentialContext.new(credentialled_object, params).call end |
Instance Method Details
#call ⇒ Object
17 18 19 |
# File 'app/contexts/services/create_credential_context.rb', line 17 def call credentialled_object.add_credential(params) end |