Class: Flatware::Configuration
- Inherits:
-
Object
- Object
- Flatware::Configuration
- Defined in:
- lib/flatware/configuration.rb
Instance Method Summary collapse
- #after_fork(&block) ⇒ Object
- #before_fork(&block) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #reset! ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 |
# File 'lib/flatware/configuration.rb', line 5 def initialize reset! end |
Instance Method Details
#after_fork(&block) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/flatware/configuration.rb', line 17 def after_fork(&block) if block_given? @after_fork = block else @after_fork end end |
#before_fork(&block) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/flatware/configuration.rb', line 9 def before_fork(&block) if block_given? @before_fork = block else @before_fork end end |
#reset! ⇒ Object
25 26 27 28 |
# File 'lib/flatware/configuration.rb', line 25 def reset! @before_fork = -> {} @after_fork = ->(_) {} end |