Class: QualtricsAPI::ResponseExportCollection
- Inherits:
-
Object
- Object
- QualtricsAPI::ResponseExportCollection
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/qualtrics_api/response_export_collection.rb
Instance Attribute Summary collapse
-
#all ⇒ Object
readonly
Returns the value of attribute all.
Instance Method Summary collapse
- #[](export_id) ⇒ Object
- #find(export_id) ⇒ Object
-
#initialize(options = {}) ⇒ ResponseExportCollection
constructor
A new instance of ResponseExportCollection.
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( = {}) @conn = [:connection] @all = [] end |
Instance Attribute Details
#all ⇒ Object (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 |