Class: Clowne::Declarations::AfterPersist
- Defined in:
- lib/clowne/declarations/after_persist.rb
Overview
:nodoc: all
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
Instance Method Summary collapse
- #compile(plan) ⇒ Object
-
#initialize(&block) ⇒ AfterPersist
constructor
A new instance of AfterPersist.
Methods inherited from Base
Constructor Details
#initialize(&block) ⇒ AfterPersist
Returns a new instance of AfterPersist.
8 9 10 11 12 |
# File 'lib/clowne/declarations/after_persist.rb', line 8 def initialize(*, &block) raise ArgumentError, "Block is required for after_persist" unless block @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
6 7 8 |
# File 'lib/clowne/declarations/after_persist.rb', line 6 def block @block end |
Instance Method Details
#compile(plan) ⇒ Object
14 15 16 |
# File 'lib/clowne/declarations/after_persist.rb', line 14 def compile(plan) plan.add(:after_persist, self) end |