Class: Kanal::Core::Services::ServiceRegistration

Inherits:
Object
  • Object
show all
Defined in:
lib/kanal/core/services/service_container.rb

Overview

Stores info about service registration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service_class, type, block) ⇒ ServiceRegistration

Returns a new instance of ServiceRegistration.



14
15
16
17
18
# File 'lib/kanal/core/services/service_container.rb', line 14

def initialize(service_class, type, block)
  @service_class = service_class
  @type = type
  @block = block
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



10
11
12
# File 'lib/kanal/core/services/service_container.rb', line 10

def block
  @block
end

#service_classObject (readonly)

Returns the value of attribute service_class.



10
11
12
# File 'lib/kanal/core/services/service_container.rb', line 10

def service_class
  @service_class
end

#typeObject (readonly)

Returns the value of attribute type.



10
11
12
# File 'lib/kanal/core/services/service_container.rb', line 10

def type
  @type
end

Instance Method Details

#block?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/kanal/core/services/service_container.rb', line 20

def block?
  !@block.nil?
end