Class: Queued::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/queued/item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, options = {}) ⇒ Item

Returns a new instance of Item.



5
6
7
8
9
10
# File 'lib/queued/item.rb', line 5

def initialize(client, options = {})
  @client = client
  @value = options[:value]
  @type = options[:type]
  @url = options[:url]
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/queued/item.rb', line 3

def type
  @type
end

#urlObject (readonly)

Returns the value of attribute url.



3
4
5
# File 'lib/queued/item.rb', line 3

def url
  @url
end

#valueObject (readonly)

Returns the value of attribute value.



3
4
5
# File 'lib/queued/item.rb', line 3

def value
  @value
end

Instance Method Details

#completeObject



12
13
14
15
# File 'lib/queued/item.rb', line 12

def complete
  @client.delete @url
  self
end