Class: SequencescapeExcel::Download

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model, Helpers::Download
Defined in:
app/sequencescape_excel/sequencescape_excel/download.rb

Overview

Download

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers::Download

#save, #workbook, #xls

Constructor Details

#initialize(sample_manifest, column_list, range_list) ⇒ Download


14
15
16
17
18
19
20
21
22
23
# File 'app/sequencescape_excel/sequencescape_excel/download.rb', line 14

def initialize(sample_manifest, column_list, range_list)
  @sample_manifest = sample_manifest
  @range_list = range_list
  @column_list = column_list

  return unless valid?

  @ranges_worksheet = Worksheet::RangesWorksheet.new(ranges: range_list, workbook: workbook, password: password)
  @data_worksheet = Worksheet::DataWorksheet.new(workbook: workbook, columns: column_list, sample_manifest: sample_manifest, ranges: range_list, password: password)
end

Instance Attribute Details

#column_listObject (readonly)

Returns the value of attribute column_list


12
13
14
# File 'app/sequencescape_excel/sequencescape_excel/download.rb', line 12

def column_list
  @column_list
end

#data_worksheetObject (readonly)

Returns the value of attribute data_worksheet


12
13
14
# File 'app/sequencescape_excel/sequencescape_excel/download.rb', line 12

def data_worksheet
  @data_worksheet
end

#range_listObject (readonly)

Returns the value of attribute range_list


12
13
14
# File 'app/sequencescape_excel/sequencescape_excel/download.rb', line 12

def range_list
  @range_list
end

#ranges_worksheetObject (readonly)

Returns the value of attribute ranges_worksheet


12
13
14
# File 'app/sequencescape_excel/sequencescape_excel/download.rb', line 12

def ranges_worksheet
  @ranges_worksheet
end

#sample_manifestObject (readonly)

Returns the value of attribute sample_manifest


12
13
14
# File 'app/sequencescape_excel/sequencescape_excel/download.rb', line 12

def sample_manifest
  @sample_manifest
end

Instance Method Details

#passwordObject


25
26
27
# File 'app/sequencescape_excel/sequencescape_excel/download.rb', line 25

def password
  @password ||= SecureRandom.base64
end