112 113 114 115 116 117 118
# File 'lib/autocad/block.rb', line 112 def to_h result = {} elements.each.with_object(result) do |a, h| h[a.key] = a.value end result end