class Duracloud::Commands::ListItems

Constants

HEADERS

Public Instance Methods

call() click to toggle source
# File lib/duracloud/commands/list_items.rb, line 8
def call
  CSV.instance($stdout, headers: HEADERS, write_headers: true) do |csv|
    Duracloud::Space.items(space_id, store_id: store_id, prefix: prefix).each do |item|
      csv << HEADERS.map { |header| item.send(header) }
    end
  end
end