class Array

Public Instance Methods

to_zaml(z=ZAML.new) click to toggle source
# File lib/icss/serialization/zaml.rb, line 390
def to_zaml(z=ZAML.new)
  z.first_time_only(self) {
    z.nested {
      if empty?
        z.emit('[]')
      else
        emitted = false
        each{|v| z.no_comment(v){
            emitted = true
            z.nl('- '); v.to_zaml(z)
          } }
        unless emitted then z.nl ; z.emit('[]') ; end
      end
    }
    z.to_s
  }
end