Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/pson.rb

Instance Method Summary collapse

Instance Method Details

#to_postscriptObject

Convert this hash into a PostScript dictionary expression.



90
91
92
93
94
95
96
97
# File 'lib/pson.rb', line 90

def to_postscript
  result = "<<"
  each_pair do |name, value|
    result << " " << name.to_postscript
    result << " " << value.to_postscript
  end
  return result + " >>"
end