Class: ActiveSaga::Configuration
- Inherits:
-
Object
- Object
- ActiveSaga::Configuration
- Defined in:
- lib/active_saga/configuration.rb
Overview
Holds gem-level configuration.
Instance Attribute Summary collapse
-
#clock ⇒ Object
Returns the value of attribute clock.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#serializer ⇒ Object
Returns the value of attribute serializer.
-
#store ⇒ Object
Returns the value of attribute store.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
-
#store! ⇒ Object
Ensures store is set before usage.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 14 |
# File 'lib/active_saga/configuration.rb', line 10 def initialize @serializer = ActiveSaga::Serializers::Json.new @logger = ActiveSupport::Logger.new($stdout, level: :info) @clock = -> { Time.now.utc } end |
Instance Attribute Details
#clock ⇒ Object
Returns the value of attribute clock.
8 9 10 |
# File 'lib/active_saga/configuration.rb', line 8 def clock @clock end |
#logger ⇒ Object
Returns the value of attribute logger.
8 9 10 |
# File 'lib/active_saga/configuration.rb', line 8 def logger @logger end |
#serializer ⇒ Object
Returns the value of attribute serializer.
8 9 10 |
# File 'lib/active_saga/configuration.rb', line 8 def serializer @serializer end |
#store ⇒ Object
Returns the value of attribute store.
8 9 10 |
# File 'lib/active_saga/configuration.rb', line 8 def store @store end |
Instance Method Details
#store! ⇒ Object
Ensures store is set before usage.
17 18 19 20 21 |
# File 'lib/active_saga/configuration.rb', line 17 def store! raise ActiveSaga::Errors::Configuration, "ActiveSaga.store is not configured" unless store store end |