Sha256: 44e1830e2933bd81fb67e1c7efb4528fa0dbeba12dafaf8a24d07a12017e58a8

Contents?: true

Size: 604 Bytes

Versions: 4

Compression:

Stored size: 604 Bytes

Contents

# frozen_string_literal: true

module TwilioBase
  module Fake
    module Notify
      class User
        attr_accessor :identity
        cattr_accessor :users

        self.users = []

        def initialize(identity = nil)
          self.identity = identity
        end

        def create(attributes)
          users << attributes.merge(sid: SecureRandom.hex(16))
        end

        def delete
          users.delete_if { |user| user.address == identity }
        end

        def segment_memberships
          TwilioBase::Fake::Notify::SegmentMembership.new
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
twilio_base-1.11.1101 spec/support/twilio_base/fake/notify/user.rb
twilio_base-1.11.11 spec/support/twilio_base/fake/notify/user.rb
twilio_base-1.9.0 spec/support/twilio_base/fake/notify/user.rb
twilio_base-1.8.0 spec/support/twilio_base/fake/notify/user.rb