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.


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

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


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

def arguments
  @arguments
end

Instance Method Details

#inspectObject


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

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


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

def to_h
  arguments
end