Sha256: 40b4ca990dce1afbf0b8856bd1db2b03d8bf93f2372530c0893b7fe31eb509f1

Contents?: true

Size: 421 Bytes

Versions: 1

Compression:

Stored size: 421 Bytes

Contents

# frozen_string_literal: true

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

      def initialize
        raise ArgumentError, "Block is required for init_as" unless block_given?

        @block = Proc.new
      end

      def compile(plan)
        plan.set(:init_as, self)
      end
    end
  end
end

Clowne::Declarations.add :init_as, Clowne::Declarations::InitAs

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
clowne-1.2.0 lib/clowne/declarations/init_as.rb