Sha256: e5b1cf4f95f3f698647d60dc7d9ed76601db5e3026877ccf23175f21b73e85d7

Contents?: true

Size: 371 Bytes

Versions: 1

Compression:

Stored size: 371 Bytes

Contents

require 'object_protocol/step'

class ObjectProtocol
  class StandIn
    attr_reader :name

    def initialize(protocol:, name:)
      @protocol = protocol
      @name     = name
    end

    def sends(message)
      Step.new(sender: self, message: message).tap do |step|
        protocol.steps << step
      end
    end

    private

    attr_reader :protocol
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
object_protocol-0.1.0 lib/object_protocol/stand_in.rb