Sha256: b9b5912569fc06660dd4fbe88f40836f78024cc6b888ea0afbee7afebe9a41e1

Contents?: true

Size: 420 Bytes

Versions: 1

Compression:

Stored size: 420 Bytes

Contents

module Writer
  class SymbolMatrix
    attr_accessor :source

    def initialize source
      @source = source
    end

    def serialization prefix = ""
      text = ""
      @source.each do |key, value|
        if value.is_a? Hash
          text += value.to.serialization(prefix + key.to_s + ".") +" "
        else
          text += "#{prefix}#{key}:#{value} "
        end
      end
      text[0..-2]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
empezar-0.2.0 lib/writer/symbolmatrix.rb