Sha256: afe93b95f74cef6ef74cf5ebac0e2c427c07f0e2437bcffa4134778498f38783

Contents?: true

Size: 428 Bytes

Versions: 2

Compression:

Stored size: 428 Bytes

Contents

# frozen_string_literal: true

module Clowne
  module Declarations
    class Finalize < Base # :nodoc: all
      attr_reader :block

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

        @block = Proc.new
      end

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

Clowne::Declarations.add :finalize, Clowne::Declarations::Finalize

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
clowne-1.1.0 lib/clowne/declarations/finalize.rb
clowne-1.0.0 lib/clowne/declarations/finalize.rb