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.


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

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.


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

def arguments
  @arguments
end

Instance Method Details

#inspectObject


153
154
155
156
157
# File 'app/sequencescape_excel/sequencescape_excel/column.rb', line 153

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


149
150
151
# File 'app/sequencescape_excel/sequencescape_excel/column.rb', line 149

def to_h
  arguments
end