Module: LLT::Core::Serviceable
- Defined in:
- lib/llt/core/serviceable.rb
Overview
Module that holds the shared functionality of all LLT Services.
cf. specs for documentation
Instance Attribute Summary collapse
-
#default_options ⇒ Object
readonly
Returns the value of attribute default_options.
Class Method Summary collapse
Instance Method Summary collapse
- #fork_instance ⇒ Object
-
#initialize(options = {}) ⇒ Object
Initializes a new service instance and configures its services.
-
#register! ⇒ Object
Registers self in the service_class with force.
Instance Attribute Details
#default_options ⇒ Object (readonly)
Returns the value of attribute default_options.
12 13 14 |
# File 'lib/llt/core/serviceable.rb', line 12 def @default_options end |
Class Method Details
.included(klass) ⇒ Object
8 9 10 |
# File 'lib/llt/core/serviceable.rb', line 8 def self.included(klass) klass.extend(ClassMethods) end |
Instance Method Details
#fork_instance ⇒ Object
28 29 30 31 32 |
# File 'lib/llt/core/serviceable.rb', line 28 def fork_instance # Not sure atm how services should be handled here - # decide later. self.class.new(@default_options) end |
#initialize(options = {}) ⇒ Object
Initializes a new service instance and configures its services
15 16 17 18 19 |
# File 'lib/llt/core/serviceable.rb', line 15 def initialize( = {}) configure() () register end |
#register! ⇒ Object
Registers self in the service_class with force
22 23 24 25 26 |
# File 'lib/llt/core/serviceable.rb', line 22 def register! guarded do write_to_register end end |