about summary refs log tree commit homepage
path: root/lib/dtas/serialize.rb
blob: 57eb626149ea4ab915244f6c24aaf3e0aab779e8 (plain)
1
2
3
4
5
6
7
8
9
10
# -*- encoding: binary -*-
# :stopdoc:
# Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
module DTAS::Serialize
  def ivars_to_hash(ivars, rv = {})
    ivars.each { |k| rv[k] = instance_variable_get("@#{k}") }
    rv
  end
end