Class: ConvenientService::Commands::IsService

Inherits:
Support::Command show all
Defined in:
lib/convenient_service/commands/is_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Support::Command

[], call

Constructor Details

#initialize(service:) ⇒ void

Parameters:

  • service (Object)

    Can be any type.



16
17
18
# File 'lib/convenient_service/commands/is_service.rb', line 16

def initialize(service:)
  @service = service
end

Instance Attribute Details

#serviceObject (readonly)

Returns the value of attribute service.



10
11
12
# File 'lib/convenient_service/commands/is_service.rb', line 10

def service
  @service
end

Instance Method Details

#callBoolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/convenient_service/commands/is_service.rb', line 23

def call
  Commands::IsServiceClass[service_class: service.class]
end