Sha256: 3d349aae887fd8bd4a494a6b1f22d4613f38720bb81e5f49d2c66133bcef173a

Contents?: true

Size: 306 Bytes

Versions: 4

Compression:

Stored size: 306 Bytes

Contents

module LovelyRufus
  module Layers
    class Layer
      def initialize(next_layer = -> (wrap) { wrap })
        @next_layer = next_layer
      end

      def call(_wrap)
        fail 'Layer subclasses must define #call that takes a Wrap'
      end

      private_attr_reader :next_layer
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lovely_rufus-1.0.0 lib/lovely_rufus/layers/layer.rb
lovely_rufus-0.3.2 lib/lovely_rufus/layers/layer.rb
lovely_rufus-0.3.1 lib/lovely_rufus/layers/layer.rb
lovely_rufus-0.3.0 lib/lovely_rufus/layers/layer.rb