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