class CephalopodMath attr_reader :worksheet def initialize(worksheet) @worksheet = worksheet end def self.for(input) new input end def wide_columns worksheet.split("\n").map(&:split).transpose end def wide_column_answers wide_columns.map{ |column| column[..-2].map(&:to_i).reduce(&(column[-1]).to_sym) } end end