lib/texp/base.rb
# Encode the list into the codes receiver.  All
Encode the list into the codes receiver.  All
Encode the list into the codes receiver . All
def encode_list(codes, list)
      if list.empty?
        codes << "[]"
      elsif list.size == 1
        codes << list.first
      else
        codes << "["
        prev = nil
        list.each do |item|
          codes << "," if prev && ! prev.kind_of?(TExp::Base)
          codes << item.to_s
          prev = item
        end
        codes << "]"
      end
    end
def encode_list ( codes , list ) if list . empty? codes << "[]" elsif list . size == 1 codes << list . first else codes << "[" prev = nil list . each do | item | codes << "," if prev && ! prev . kind_of? ( TExp :: Base ) codes << item . to_s prev = item end codes << "]" end end
Encode the list into the codes receiver.
Encode the list into the codes receiver .
codes
<not_specific>
list
<not_specific>