Sha256: 4a480afa0b3f5fe694d4b689c2f42e60794c089046b43ff6a1f9e9b141cdaedc

Contents?: true

Size: 395 Bytes

Versions: 8

Compression:

Stored size: 395 Bytes

Contents

# frozen_string_literal: true

require 'dry/effects/instruction'

module Dry
  module Effects
    module Instructions
      class Execute < Instruction
        attr_reader :block

        def initialize(block)
          @block = block
        end

        def call
          block.call
        end
      end

      def self.Execute(&block)
        Execute.new(block)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dry-effects-0.1.5 lib/dry/effects/instructions/execute.rb
dry-effects-0.1.4 lib/dry/effects/instructions/execute.rb
dry-effects-0.1.3 lib/dry/effects/instructions/execute.rb
dry-effects-0.1.2 lib/dry/effects/instructions/execute.rb
dry-effects-0.1.1 lib/dry/effects/instructions/execute.rb
dry-effects-0.1.0 lib/dry/effects/instructions/execute.rb
dry-effects-0.1.0.alpha2 lib/dry/effects/instructions/execute.rb
dry-effects-0.1.0.alpha lib/dry/effects/instructions/execute.rb