def select *attributes, &block
options = attributes.last.is_a?(Hash) ? attributes.pop : {}
args = attributes + [options]
return if handle_query_options(:select, *args, &block)
unless block_given?
return Enumerator.new(self, :select, *args)
end
if attributes.empty?
output_list = '*'
else
output_list = [attributes].flatten.collect do |attr|
coerce_attribute(attr)
end.join(', ')
end
perform_select(options.merge(:output_list => output_list)) do |response|
response.items.each do |item|
yield(ItemData.new(:domain => domain, :response_object => item))
end
end
nil
end