Sha256: 644d45f590990723eb9a022c8ebdc2ddb82c50ab7bf4b7005de99be6caf4938d

Contents?: true

Size: 586 Bytes

Versions: 1

Compression:

Stored size: 586 Bytes

Contents

require 'csv'

module ErrandBoy
  class CSV
    class SlackInvite < Base
      def headers
        result = %w(sender_name sender_email register_name register_email team)
        result.to_csv
      end

      def values
        result = [@request.sender['name'].to_s, @request.sender['email'].to_s,
                  @request.register['name'].to_s, @request.register['email'].to_s,
                  @request.destination['team'].to_s]
        result.to_csv
      end

      def duplicated?
        include?(:register_email, @request.register['email'].to_s)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
errand-boy-0.1.0 lib/errand_boy/csv/slack_invite.rb