Class: ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Commands::CreateDataClass

Inherits:
ConvenientService::Support::Command
  • Object
show all
Includes:
ConvenientService::Support::DependencyContainer::Import
Defined in:
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/commands/create_data_class.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ConvenientService::Support::DependencyContainer::Import

import

Methods inherited from ConvenientService::Support::Command

[], call

Constructor Details

#initialize(result_class:) ⇒ void

Parameters:

  • result_class (Class)


30
31
32
# File 'lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/commands/create_data_class.rb', line 30

def initialize(result_class:)
  @result_class = result_class
end

Instance Attribute Details

#result_classObject (readonly)

Returns the value of attribute result_class.



19
20
21
# File 'lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/commands/create_data_class.rb', line 19

def result_class
  @result_class
end

Instance Method Details

#callClass

Returns:

  • (Class)


37
38
39
# File 'lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/commands/create_data_class.rb', line 37

def call
  commands.FindOrCreateEntity.call(namespace: result_class, proto_entity: Entities::Data)
end