Sha256: d38e4a4c126e0e65e5eb2ebe1d566090ff92736d82d2abc27e82b9c99162173d

Contents?: true

Size: 348 Bytes

Versions: 12

Compression:

Stored size: 348 Bytes

Contents

module BridgeCache
  module Webhooks
    class Message
      attr_reader :payload

      def initialize(payload)
        @payload = payload
      end

      def resource_object
        @payload[@payload['resource']]
      end

      def payload_class
        "BridgeCache::#{@payload['resource'].camelcase}".constantize
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
bridge_cache-0.4.7 app/lib/bridge_cache/webhooks/message.rb
bridge_cache-0.4.6 app/lib/bridge_cache/webhooks/message.rb
bridge_cache-0.4.5 app/lib/bridge_cache/webhooks/message.rb
bridge_cache-0.4.4 app/lib/bridge_cache/webhooks/message.rb
bridge_cache-0.4.3 app/lib/bridge_cache/webhooks/message.rb
bridge_cache-0.4.2 app/lib/bridge_cache/webhooks/message.rb
bridge_cache-0.4.1 app/lib/bridge_cache/webhooks/message.rb
bridge_cache-0.3.24 app/lib/bridge_cache/webhooks/message.rb
bridge_cache-0.3.23 app/lib/bridge_cache/webhooks/message.rb
bridge_cache-0.3.22 app/lib/bridge_cache/webhooks/message.rb
bridge_cache-0.3.21 app/lib/bridge_cache/webhooks/message.rb
bridge_cache-0.3.20 app/lib/bridge_cache/webhooks/message.rb