Class: Kanal::Core::Services::ServiceRegistration
- Inherits:
-
Object
- Object
- Kanal::Core::Services::ServiceRegistration
- Defined in:
- lib/kanal/core/services/service_container.rb
Overview
Stores info about service registration
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#service_class ⇒ Object
readonly
Returns the value of attribute service_class.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #block? ⇒ Boolean
-
#initialize(service_class, type, block) ⇒ ServiceRegistration
constructor
A new instance of ServiceRegistration.
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
#block ⇒ Object (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_class ⇒ Object (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 |
#type ⇒ Object (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
20 21 22 |
# File 'lib/kanal/core/services/service_container.rb', line 20 def block? !@block.nil? end |