Sha256: 64506f352d6ddcc081eba1130752be5d49c2bce35253b6439a8fe5d9cc2dc1a0

Contents?: true

Size: 501 Bytes

Versions: 3

Compression:

Stored size: 501 Bytes

Contents

# frozen_string_literal: true

require 'bundle_notification/snippet'

module BundleNotification
  class SnippetMessage
    attr_reader :mailer_class, :recipient, :snippet_data

    def initialize(mailer_class, recipient, snippet_data)
      @mailer_class = mailer_class
      @recipient = recipient
      @snippet_data = snippet_data
    end

    def deliver
      Snippet.create!(
        mailer_class: mailer_class,
        recipient: recipient,
        data: snippet_data
      )
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bundle_notification-0.2.2 lib/bundle_notification/snippet_message.rb
bundle_notification-0.2.1 lib/bundle_notification/snippet_message.rb
bundle_notification-0.2.0 lib/bundle_notification/snippet_message.rb