Class: SequencescapeExcel::Column::ArgumentBuilder

Inherits:
Object
  • Object
show all
Defined in:
app/sequencescape_excel/sequencescape_excel/column.rb

Overview

Builds arguments

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args, key, default_conditional_formattings) ⇒ ArgumentBuilder

Returns a new instance of ArgumentBuilder


137
138
139
140
# File 'app/sequencescape_excel/sequencescape_excel/column.rb', line 137

def initialize(args, key, default_conditional_formattings)
  @arguments = args.reverse_merge(name: key)
  combine_conditional_formattings(default_conditional_formattings)
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments


135
136
137
# File 'app/sequencescape_excel/sequencescape_excel/column.rb', line 135

def arguments
  @arguments
end

Instance Method Details

#inspectObject


146
147
148
# File 'app/sequencescape_excel/sequencescape_excel/column.rb', line 146

def inspect
  "<#{self.class}: @name=#{name}, @heading=#{heading}, @number=#{number}, @type=#{type}, @validation#{validation}, @value=#{value}, @unlocked=#{unlocked}, @conditional_formattings=#{conditional_formattings}, @attribute=#{attribute}, @range=#{range}>"
end

#to_hObject


142
143
144
# File 'app/sequencescape_excel/sequencescape_excel/column.rb', line 142

def to_h
  arguments
end