Class: ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Message::Commands::IsMessage

Inherits:
ConvenientService::Support::Command
  • Object
show all
Defined in:
lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/commands/is_message.rb

Overview

Check whether message can be considered as Message instance.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ConvenientService::Support::Command

[], call

Constructor Details

#initialize(message:) ⇒ void

Parameters:

  • message (Object)

    Can be any type.



28
29
30
# File 'lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/commands/is_message.rb', line 28

def initialize(message:)
  @message = message
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



22
23
24
# File 'lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/commands/is_message.rb', line 22

def message
  @message
end

Instance Method Details

#callBoolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_j_send_status_and_attributes/entities/message/commands/is_message.rb', line 35

def call
  message.class.include?(Entities::Message::Concern)
end