Class: Clemency::Configuration
- Inherits:
-
Object
- Object
- Clemency::Configuration
- Extended by:
- Forwardable
- Defined in:
- lib/clemency/configuration.rb
Instance Attribute Summary collapse
-
#callbacks ⇒ Object
readonly
Returns the value of attribute callbacks.
Instance Method Summary collapse
- #after_down(&blk) ⇒ Object
- #after_up(&blk) ⇒ Object
- #before_down(&blk) ⇒ Object
- #before_up(&blk) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 |
# File 'lib/clemency/configuration.rb', line 8 def initialize @callbacks = Callbacks.new end |
Instance Attribute Details
#callbacks ⇒ Object (readonly)
Returns the value of attribute callbacks.
7 8 9 |
# File 'lib/clemency/configuration.rb', line 7 def callbacks @callbacks end |
Instance Method Details
#after_down(&blk) ⇒ Object
20 21 22 |
# File 'lib/clemency/configuration.rb', line 20 def after_down(&blk) @callbacks.set(:after_down, blk) end |
#after_up(&blk) ⇒ Object
14 15 16 |
# File 'lib/clemency/configuration.rb', line 14 def after_up(&blk) @callbacks.set(:after_up, blk) end |
#before_down(&blk) ⇒ Object
17 18 19 |
# File 'lib/clemency/configuration.rb', line 17 def before_down(&blk) @callbacks.set(:before_down, blk) end |
#before_up(&blk) ⇒ Object
11 12 13 |
# File 'lib/clemency/configuration.rb', line 11 def before_up(&blk) @callbacks.set(:before_up, blk) end |