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: bit.rb
    path of file: ./repos/stackneveroverflow/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.3/lib/active_record/connection_adapters/postgresql/oid
    
    the code of the file until where you have to start completion: module ActiveRecord
  module ConnectionAdapters
    module PostgreSQL
      module OID # :n
    
          def cast_value(value)
            if ::String === value
              case value
              when /^0x/i
                value[2..-1].hex.to_s(2) # Hexadecimal notation
              else
                value                    # Bit-string notation
              end