Class: Exporter::Approvals

Inherits:
Base
  • Object
show all
Defined in:
lib/exporter/approvals.rb

Instance Attribute Summary

Attributes inherited from Base

#cart

Instance Method Summary collapse

Methods inherited from Base

#initialize, #to_csv

Constructor Details

This class inherits a constructor from Exporter::Base

Instance Method Details

#approvalsObject


7
8
9
# File 'lib/exporter/approvals.rb', line 7

def approvals
  self.cart.approvals
end

#headersObject


3
4
5
# File 'lib/exporter/approvals.rb', line 3

def headers
  ["status","approver","created_at"]
end

#rowsObject


11
12
13
14
15
# File 'lib/exporter/approvals.rb', line 11

def rows
  self.approvals.map do |approval|
    [approval.status, approval.user_email_address,approval.updated_at]
  end
end