Class: Twilio::REST::Members

Inherits:
ListResource show all
Defined in:
lib/twilio-ruby/rest/queues/members.rb

Instance Method Summary collapse

Methods inherited from ListResource

#create, #get, #inspect, #list

Methods included from Utils

#detwilify, #twilify

Constructor Details

#initialize(path, client) ⇒ Members

Returns a new instance of Members.



4
5
6
7
8
# File 'lib/twilio-ruby/rest/queues/members.rb', line 4

def initialize(path, client)
  super
  # hard-code the json keys since members are special
  @list_key, @instance_id_key = 'queue_members', 'call_sid'
end

Instance Method Details

#dequeue(url, method = 'POST') ⇒ Object



18
19
20
# File 'lib/twilio-ruby/rest/queues/members.rb', line 18

def dequeue(url, method='POST')
  front.dequeue url, method
end

#frontObject



10
11
12
# File 'lib/twilio-ruby/rest/queues/members.rb', line 10

def front
  @instance_class.new "#{@path}/Front", @client
end

#front!Object



14
15
16
# File 'lib/twilio-ruby/rest/queues/members.rb', line 14

def front!
  front.refresh
end