Sha256: f001a230385972dd99781b0082ab793f9865fdd43986c65dfb252b914dc7a59a

Contents?: true

Size: 287 Bytes

Versions: 12

Compression:

Stored size: 287 Bytes

Contents

# frozen_string_literal: true

require 'ostruct'

module Atacama
  # Generic object store for passing values between contracts
  class Context < OpenStruct
    alias key? respond_to?

    def merge!(hash)
      hash.each { |(key, value)| self[key] = value }
      self
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
atacama-0.2.2 lib/atacama/contract/context.rb
atacama-0.2.1 lib/atacama/contract/context.rb
atacama-0.2.0 lib/atacama/contract/context.rb
atacama-0.1.11 lib/atacama/contract/context.rb
atacama-0.1.10 lib/atacama/contract/context.rb
atacama-0.1.9 lib/atacama/contract/context.rb
atacama-0.1.8 lib/atacama/contract/context.rb
atacama-0.1.7 lib/atacama/contract/context.rb
atacama-0.1.6 lib/atacama/contract/context.rb
atacama-0.1.5 lib/atacama/contract/context.rb
atacama-0.1.4 lib/atacama/contract/context.rb
atacama-0.1.3 lib/atacama/contract/context.rb