lib/crossyglot/puzzle.rb
def update_word_lengths!
      each_cell do |cell, x, y|
        cell.across_length = cell.across? ? word_length(x, y, 1, 0) : nil
        cell.down_length = cell.down? ? word_length(x, y, 0, 1) : nil
      end
    end
# Calculate and update #across_length and #down_length for each cell. Should be called by all
# subclasses after setting of #cells is complete.
Calculate and update #across_length and #down_length for each cell. Should be called by all
subclasses after setting of #cells is complete.
Calculate and update #across_length and #down_length for each cell . Should be called by all subclasses after setting of #cells is complete .
def update_word_lengths!
      each_cell do |cell, x, y|
        cell.across_length = cell.across? ? word_length(x, y, 1, 0) : nil
        cell.down_length = cell.down? ? word_length(x, y, 0, 1) : nil
      end
    end
def update_word_lengths! each_cell do | cell , x , y | cell . across_length = cell . across? ? word_length ( x , y , 1 , 0 ) : nil cell . down_length = cell . down? ? word_length ( x , y , 0 , 1 ) : nil end end
Calculate and update #across_length and #down_length for each cell.
Calculate and update #across_length and #down_length for each cell .