Class: Clowne::Declarations::AfterClone

Inherits:
Base
  • Object
show all
Defined in:
lib/clowne/declarations/after_clone.rb

Overview

:nodoc: all

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#matches?

Constructor Details

#initializeAfterClone

Returns a new instance of AfterClone.

Raises:

  • (ArgumentError)


8
9
10
11
12
# File 'lib/clowne/declarations/after_clone.rb', line 8

def initialize
  raise ArgumentError, 'Block is required for after_clone' unless block_given?

  @block = Proc.new
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



6
7
8
# File 'lib/clowne/declarations/after_clone.rb', line 6

def block
  @block
end

Instance Method Details

#compile(plan) ⇒ Object



14
15
16
# File 'lib/clowne/declarations/after_clone.rb', line 14

def compile(plan)
  plan.add(:after_clone, self)
end