You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: format.rb
    path of file: ./repos/spreadsheet/lib/spreadsheet
    
    the code of the file until where you have to start completion: # encoding: utf-8
require 'spreadsheet/datatypes'
require 'spreadsheet/encodings'
require 'spreadsheet/font'

module Spreadsheet
  ##
  # Formatting data
  class Format
    include Spreadsheet::Datatypes
    include Spreadsheet::Encodings
    ##
    # You can set the following boolean attributes:
    # #cross_down::       Draws a Line from the top-left to the bottom-right
    #                     corner of a cell.
    # #cross_up::         Draws a Line from the bottom-left to the top-right
    #                     corner of a cell.
    # #hidden::           The cell is hidden.
    # #locked::           The cell is locked.
    # #merge_range::      The cell is in a merged range.
    # #shrink::           Shrink the contents to fit the cell.
    # #text_justlast::    Force the last line of a cell to be justified. This
    
    def initialize opts={}
      @font             = Font.new client("Arial", 'UTF-8'), :family => :swiss
      @number_format    = client 'GENERAL', 'UTF-8'
      @rotation         = 0
      @pattern          = 0
      @bottom_color     = :black
      @top_color        = :black
      @left_color       = :black
      @right_color      = :black
      @diagonal_color   = :black
      @pattern_fg_color = :border
      @pattern_bg_color = :pattern_bg
      @regexes = {
        :date         => Regexp.new(client("[YMD]|d{2}|m{3}|y{2}", 'UTF-8')),
        :date_or_time => Regexp.new(client("[hmsYMD]", 'UTF-8')),
        :datetime     => Regexp.new(client("([YMD].*[HS])|([HS].*[YMD])", 'UTF-8')),
        :time         => Regexp.new(client("[hms]", 'UTF-8')),
        :number       => Regexp.new(client("([\#]|0+)", 'UTF-8')),
        :locale       => Regexp.new(client(/\A\[\$\-\S+\]/.to_s, 'UTF-8')),
      }

      # Temp code to prevent merged formats in non-merged cells.
      @used_merge = 0
      update_format(opts)

      yield self if block_given?
    end