Class: QualtricsAPI::ResponseExportCollection

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Enumerable
Defined in:
lib/qualtrics_api/response_export_collection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ResponseExportCollection

Returns a new instance of ResponseExportCollection.



11
12
13
14
# File 'lib/qualtrics_api/response_export_collection.rb', line 11

def initialize(options = {})
  @conn = options[:connection]
  @all = []
end

Instance Attribute Details

#allObject (readonly)

Returns the value of attribute all.



6
7
8
# File 'lib/qualtrics_api/response_export_collection.rb', line 6

def all
  @all
end

Instance Method Details

#[](export_id) ⇒ Object



16
# File 'lib/qualtrics_api/response_export_collection.rb', line 16

def [](export_id); find(export_id); end

#find(export_id) ⇒ Object



17
18
19
20
21
# File 'lib/qualtrics_api/response_export_collection.rb', line 17

def find(export_id)
  @all.select do |response_export|
    response_export.id == export_id
  end.first || QualtricsAPI::ResponseExport.new(:id => export_id , connection: @conn)
end