Module: ConvenientService::Service::Plugins::HasJSendResult

Defined in:
lib/convenient_service/service/plugins/has_j_send_result.rb,
lib/convenient_service/service/plugins/has_j_send_result/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/constants.rb,
lib/convenient_service/service/plugins/has_j_send_result/container.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result.rb,
lib/convenient_service/service/plugins/has_j_send_result/commands/is_result.rb,
lib/convenient_service/service/plugins/has_j_send_result/concern/class_methods.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/concern/instance_methods.rb,
lib/convenient_service/service/plugins/has_j_send_result/commands/create_result_class.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_inspect/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_step/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_own_result/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_fallbacks/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_negated_result/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_from_exception/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_be_stubbed_result/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_parent_result/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_recalculate_result/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_checked_status/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/can_have_parent_result/constants.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_amazing_print_inspect/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_awesome_print_inspect/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/exceptions.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/middleware.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_stubbed_result_invocations_counter/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/raises_on_not_checked_result_status/exceptions.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/raises_on_not_checked_result_status/middleware.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_stubbed_result_invocations_counter/middleware.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/concern/class_methods.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/helps_to_learn_similarities_with_common_objects/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/concern/instance_methods.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/structs/j_send_attributes.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/helps_to_learn_similarities_with_common_objects/exceptions.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/commands/create_code_class.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/commands/create_data_class.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/commands/create_status_class.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/commands/create_message_class.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/commands/is_code.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/commands/is_data.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/commands/cast_j_send_attributes.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/commands/is_status.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/concern/class_methods.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/concern/class_methods.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/commands/is_message.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/concern/class_methods.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/concern/instance_methods.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/concern/instance_methods.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/concern/class_methods.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/helps_to_learn_similarities_with_common_objects/concern/instance_methods.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/concern/instance_methods.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/plugins/has_inspect/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins/has_inspect/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/concern/instance_methods.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/has_inspect/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/plugins/has_inspect/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/can_be_checked/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/can_be_checked/middleware.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/plugins/has_amazing_print_inspect/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/code/plugins/has_awesome_print_inspect/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins/has_amazing_print_inspect/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins/has_awesome_print_inspect/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/has_amazing_print_inspect/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/status/plugins/has_awesome_print_inspect/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/plugins/has_amazing_print_inspect/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/plugins/has_awesome_print_inspect/concern.rb,
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/data/plugins/has_inspect/commands/generate_inspect_output.rb

Defined Under Namespace

Modules: Commands, Concern, Constants, Container, Entities

Class Method Summary collapse

Class Method Details

.result?(result) ⇒ Boolean

Checks whether an object is a result instance.

Examples:

Simple usage.

class Service
  include ConvenientService::Standard::Config

  def result
    success
  end
end

result = Service.result

ConvenientService::Plugins::Service::HasJSendResult.result?(result)
# => true

ConvenientService::Plugins::Service::HasJSendResult.result?(42)
# => false

Parameters:

  • result (Object)

    Can be any type.

Returns:

  • (Boolean)


39
40
41
# File 'lib/convenient_service/service/plugins/has_j_send_result.rb', line 39

def result?(result)
  Commands::IsResult[result: result]
end