Sha256: bb3cda54477ccaf092b036ed224061428ba203fdd9017fb6cb875e7922a1531b
Contents?: true
Size: 356 Bytes
Versions: 23
Compression:
Stored size: 356 Bytes
Contents
module Euston class Event def initialize data = {} if (data.keys & ['body', 'headers']).size == 2 @body, @headers = data.values_at 'body', 'headers' else @headers = {} @body = data end end attr_reader :headers, :body def to_hash { :headers => @headers, :body => @body } end end end
Version data entries
23 entries across 23 versions & 1 rubygems