Sha256: 8ff3dfe850b4c2ab72be2a23e11dd5bdecfdd7b6eb8dad4d01eca7f8e410f321

Contents?: true

Size: 363 Bytes

Versions: 2

Compression:

Stored size: 363 Bytes

Contents

module Cloudist
  class Callback

    attr_reader :payload, :source

    def initialize(source)
      @source = source
    end
    
    def call(payload)
      @payload = payload
      instance_eval(&source)
    end
    
    def data
      payload.body
    end
    
    def headers
      payload.headers
    end
    
    def runtime
      
    end
    
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cloudist-0.1.1 lib/cloudist/callback.rb
cloudist-0.1.0 lib/cloudist/callback.rb